From: Christian Heller Date: Sun, 20 Nov 2016 00:41:31 +0000 (+0100) Subject: Document a bug and code problem to fix later. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/tasks?a=commitdiff_plain;h=eb9cbfe0b76e217743a18950693d90ebd3a20690;p=redo-blog Document a bug and code problem to fix later. --- diff --git a/README.md b/README.md index 80b13e8..eb2b318 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ Run ./test.sh. setup ----- -To set up a directory with symbolic links to the relevant .do files and other -important files, run ./add_dir.sh DIRECTORY. +To set up a directory with symbolic links to the relevant files in ./processor/, +run ./add_dir.sh DIRECTORY. You can then enter the directory and run redo there. This will generate article .html files from all .md and .rst files, plus a ./index.html, and a ./feed.xml. @@ -29,3 +29,10 @@ You can then enter the directory and run redo there. This will generate article also be generated a .uuid and a .intermediate file; furthermore, files with metadata used in ./feed.xml and ./index.html will be built and can be edited to customize the blog: ./url, ./author, ./uuid, ./title.) + +bugs +---- + +Due to bad shell scripting in ./processor/index.html.do and +./processor/feed.xml.do (see the FIXME notes there), source files whose names +contain "$" break the redo processing. diff --git a/processor/feed.xml.do b/processor/feed.xml.do index 14ead59..4f67b27 100644 --- a/processor/feed.xml.do +++ b/processor/feed.xml.do @@ -35,6 +35,8 @@ printf "urn:uuid:%s\n" "$uuid" # Iterate through most recent entries (go by lastmod date of source files) to # build feed head "updated" element, and individual entries. +# FIXME: This ls parsing is a bad way to loop through the sorted files. Besides, +# $('\0') is a bashism. first_run=0 files=`ls -1t *.rst *.md | head -10 | tr '\n' $'\0'` oldIFS="$IFS" diff --git a/processor/index.html.do b/processor/index.html.do index 2b71ffb..e436a4a 100644 --- a/processor/index.html.do +++ b/processor/index.html.do @@ -15,8 +15,9 @@ blog_title=`read_and_escape_file "$title_file" | head -1` printf "%s\n\n\n" "$blog_title" printf "

%s

\n