summaryrefslogtreecommitdiff
path: root/lists
diff options
context:
space:
mode:
Diffstat (limited to 'lists')
-rw-r--r--lists/default.md.do41
l---------lists/dirty-haskell/0011
l---------lists/dirty-haskell/0021
-rw-r--r--lists/dirty-haskell/title1
l---------lists/zz_all/0011
l---------lists/zz_all/0021
l---------lists/zz_all/0031
-rw-r--r--lists/zz_all/title1
8 files changed, 0 insertions, 48 deletions
diff --git a/lists/default.md.do b/lists/default.md.do
deleted file mode 100644
index 55abe6f..0000000
--- a/lists/default.md.do
+++ /dev/null
@@ -1,41 +0,0 @@
1#!/usr/bin/env bash
2redo-ifchange "$2/title"
3
4POSTS=()
5while read -r -d $'\0'; do
6 post=$(realpath --relative-to=. "$REPLY")
7 POSTS+=("$post")
8done < <(find "$2" -maxdepth 1 -mindepth 1 -not -name 'title' -not -name 'preview' -print0 | sort -z)
9
10for x in "${POSTS[@]}"; do
11 printf "%s\0%s\0" "$x" "${x%.md}.html"
12done | xargs -r -0 redo-ifchange
13
14TITLE=$(< $2/title)
15
16cat <<EOF
17% $(< "$2/title")
18
19EOF
20
21POST_TITLES=()
22for x in "${POSTS[@]}"; do
23 title=$(pandoc -t json "$x" | ../build/extract-title.hs)
24 POST_TITLES+=("$title")
25done
26
27for n in $(seq 0 $((${#POSTS[@]}-1))); do
28 printf "* [%s](%s)\n" "${POST_TITLES[$n]}" "${POSTS[$n]%.md}.html"
29done
30
31>"$2/preview"
32prev_no=3
33if [[ ${#POSTS[@]} -gt $prev_no ]]; then
34 printf "* …\n" >> "$2/preview"
35else
36 prev_no=${#POSTS[@]}
37fi
38
39for n in $(seq $prev_no -1 1); do
40 printf "* [%s](%s)\n" "${POST_TITLES[-$n]}" "${POSTS[-$n]%.md}.html" >>"$2/preview"
41done
diff --git a/lists/dirty-haskell/001 b/lists/dirty-haskell/001
deleted file mode 120000
index 92c240d..0000000
--- a/lists/dirty-haskell/001
+++ /dev/null
@@ -1 +0,0 @@
1../../posts/blog-documentation.md \ No newline at end of file
diff --git a/lists/dirty-haskell/002 b/lists/dirty-haskell/002
deleted file mode 120000
index ed24126..0000000
--- a/lists/dirty-haskell/002
+++ /dev/null
@@ -1 +0,0 @@
1../../posts/blog-rss.md \ No newline at end of file
diff --git a/lists/dirty-haskell/title b/lists/dirty-haskell/title
deleted file mode 100644
index e40f49c..0000000
--- a/lists/dirty-haskell/title
+++ /dev/null
@@ -1 +0,0 @@
1Blog Software
diff --git a/lists/zz_all/001 b/lists/zz_all/001
deleted file mode 120000
index 92c240d..0000000
--- a/lists/zz_all/001
+++ /dev/null
@@ -1 +0,0 @@
1../../posts/blog-documentation.md \ No newline at end of file
diff --git a/lists/zz_all/002 b/lists/zz_all/002
deleted file mode 120000
index ed24126..0000000
--- a/lists/zz_all/002
+++ /dev/null
@@ -1 +0,0 @@
1../../posts/blog-rss.md \ No newline at end of file
diff --git a/lists/zz_all/003 b/lists/zz_all/003
deleted file mode 120000
index 1057f2c..0000000
--- a/lists/zz_all/003
+++ /dev/null
@@ -1 +0,0 @@
1../../posts/pwutil.md \ No newline at end of file
diff --git a/lists/zz_all/title b/lists/zz_all/title
deleted file mode 100644
index 73a5267..0000000
--- a/lists/zz_all/title
+++ /dev/null
@@ -1 +0,0 @@
1All Posts