summaryrefslogtreecommitdiff
path: root/lists
diff options
context:
space:
mode:
Diffstat (limited to 'lists')
-rw-r--r--lists/default.md.do6
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
2redo-ifchange "$2/title" 2redo-ifchange "$2/title"
3 3
4extracttitle() {
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
4POSTS=() 8POSTS=()
5while read -r -d $'\0'; do 9while read -r -d $'\0'; do
6 post=$(realpath --relative-to=. "$REPLY") 10 post=$(realpath --relative-to=. "$REPLY")
@@ -20,7 +24,7 @@ EOF
20 24
21POST_TITLES=() 25POST_TITLES=()
22for x in "${POSTS[@]}"; do 26for 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")
25done 29done
26 30