From f7d4ba2023ab18b9d7c5fad85cbb863c61e6272c Mon Sep 17 00:00:00 2001 From: Viktor Kleen Date: Fri, 2 Jan 2015 09:29:04 +0000 Subject: initial commit --- lists/all/001 | 1 + lists/all/002 | 1 + lists/all/003 | 1 + lists/all/title | 1 + lists/default.md.do | 24 ++++++++++++++++++++++++ lists/stuff/001 | 1 + lists/stuff/002 | 1 + lists/stuff/title | 1 + 8 files changed, 31 insertions(+) create mode 120000 lists/all/001 create mode 120000 lists/all/002 create mode 120000 lists/all/003 create mode 100644 lists/all/title create mode 100644 lists/default.md.do create mode 120000 lists/stuff/001 create mode 120000 lists/stuff/002 create mode 100644 lists/stuff/title (limited to 'lists') diff --git a/lists/all/001 b/lists/all/001 new file mode 120000 index 0000000..1ce79c6 --- /dev/null +++ b/lists/all/001 @@ -0,0 +1 @@ +../../posts/blub.md \ No newline at end of file diff --git a/lists/all/002 b/lists/all/002 new file mode 120000 index 0000000..1ca4d2f --- /dev/null +++ b/lists/all/002 @@ -0,0 +1 @@ +../../posts/blub2.md \ No newline at end of file diff --git a/lists/all/003 b/lists/all/003 new file mode 120000 index 0000000..5df958a --- /dev/null +++ b/lists/all/003 @@ -0,0 +1 @@ +../../posts/blub3.md \ No newline at end of file diff --git a/lists/all/title b/lists/all/title new file mode 100644 index 0000000..73a5267 --- /dev/null +++ b/lists/all/title @@ -0,0 +1 @@ +All Posts diff --git a/lists/default.md.do b/lists/default.md.do new file mode 100644 index 0000000..94636df --- /dev/null +++ b/lists/default.md.do @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +redo-ifchange "$2/title" + +POSTS=() +while read -r -d $'\0'; do + post=$(realpath --relative-to=. "$REPLY") + POSTS+=("$post") +done < <(find "$2" -maxdepth 1 -mindepth 1 -not -name 'title' -print0 | sort -z) + +for x in "${POSTS[@]}"; do + printf "%s\0%s\0" "$x" "${x%.md}.html" +done | xargs -r -0 redo-ifchange + +TITLE=$(< $2/title) + +cat <&1 >/dev/null) + printf "* [%s](%s)\n" "$title" "${x%.md}.html" +done diff --git a/lists/stuff/001 b/lists/stuff/001 new file mode 120000 index 0000000..1ce79c6 --- /dev/null +++ b/lists/stuff/001 @@ -0,0 +1 @@ +../../posts/blub.md \ No newline at end of file diff --git a/lists/stuff/002 b/lists/stuff/002 new file mode 120000 index 0000000..5df958a --- /dev/null +++ b/lists/stuff/002 @@ -0,0 +1 @@ +../../posts/blub3.md \ No newline at end of file diff --git a/lists/stuff/title b/lists/stuff/title new file mode 100644 index 0000000..9d43527 --- /dev/null +++ b/lists/stuff/title @@ -0,0 +1 @@ +Stuff -- cgit v1.2.3