{{title}}
-
-
-
{{title}} #
+
+
+
/' -e 's/^\+ /+
/' -e '/
/ s/$/<\/p>/' \ | rec2csv \ | csvjson \ @@ -40,19 +59,21 @@ _json: | jq '. | { data: . }' # html -html: +@html: just _json \ | mustache - templates/html.mustache \ > www/index.html # rss -rss: +@rss: just _json \ | mustache - templates/feed.mustache \ > www/feed.xml # build html and rss -build: html rss +@build: html recfeed rss + recset db/feed.rec -t feed -f updated -s `date -Iseconds` \ + && recset db/feed.rec -t item -f published -s `date -Iseconds` # upload up: @@ -60,3 +81,22 @@ up: # build and upload all: build up + +# show posting frequency +sparkline: + #!/bin/zsh + for year in `recsel {{database}} -P created -C | xargs -I {} gdate -d"{}" +"%Y" | uniq` + do + printf "$year: " + join -j 2 -t' ' -e "0" -o 2.1 -a1 \ + <(for month in `seq 1 12`; do printf "%d %d-%02d\n" 0 $year $month; done) \ + <(recsel {{database}} -P created -e "created >> '$(gdate -d"$year-01-01")' && created << '$(gdate -d"$year-12-31 +1 days")'" -C \ + | while read d; do gdate -d $d +"%Y-%m"; done \ + | uniq -c \ + | sed 's/^ *//') \ + | xargs sparkline + done + +# show drafts +drafts: + recsel -e 'flags ~ "draft"' {{database}} -p title,created,body diff --git a/templates/html.mustache b/templates/html.mustache index d64b52f..104a120 100644 --- a/templates/html.mustache +++ b/templates/html.mustache @@ -4,13 +4,14 @@ -
-
-
+
+