diff options
Diffstat (limited to 'lists')
-rw-r--r-- | lists/default.md.do | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lists/default.md.do b/lists/default.md.do index fffd6e2..121955e 100644 --- a/lists/default.md.do +++ b/lists/default.md.do | |||
@@ -1,6 +1,10 @@ | |||
1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2 | redo-ifchange "$2/title" | 2 | redo-ifchange "$2/title" |
3 | 3 | ||
4 | extracttitle() { | ||
5 | runhaskell -package-conf=$(find ../.cabal-sandbox -maxdepth 1 -iname '*.conf.d' | head -n 1) ../build/extract-title.hs $@ 2>&1 | grep 'title: ' | cut -d ' ' -f '2-' | ||
6 | } | ||
7 | |||
4 | POSTS=() | 8 | POSTS=() |
5 | while read -r -d $'\0'; do | 9 | while read -r -d $'\0'; do |
6 | post=$(realpath --relative-to=. "$REPLY") | 10 | post=$(realpath --relative-to=. "$REPLY") |
@@ -20,7 +24,7 @@ EOF | |||
20 | 24 | ||
21 | POST_TITLES=() | 25 | POST_TITLES=() |
22 | for x in "${POSTS[@]}"; do | 26 | for x in "${POSTS[@]}"; do |
23 | title=$(pandoc -t json "$x" | ../build/extract-title.hs 2>&1 >/dev/null) | 27 | title=$(pandoc -t json "$x" | extracttitle) |
24 | POST_TITLES+=("$title") | 28 | POST_TITLES+=("$title") |
25 | done | 29 | done |
26 | 30 | ||