diff --git a/ed/blogitem.ed b/ed/blogitem.ed deleted file mode 100644 index 39d8d7f..0000000 --- a/ed/blogitem.ed +++ /dev/null @@ -1,13 +0,0 @@ -. -g/BEGIN/ka -g/END/kb -1,'ad -'b,$d -%s/^- // -%s,,time: \1|, -%s, - \[\(.*\)\],title: \1|, -%s,(\(.*\))$,source: \1|link: \1|, -%s/html/md/ -%s/|/\ -/g -1,$w /dev/stdout diff --git a/ed/journalitem.ed b/ed/journalitem.ed deleted file mode 100644 index 1c1004e..0000000 --- a/ed/journalitem.ed +++ /dev/null @@ -1,13 +0,0 @@ -. -g/BEGIN/ka -g/END/kb -1,'ad -'b,$d -g/^##/+s/^/note: / -v/^note/s/^/+ / -%s/+ ##/##/ -%s_^## - \(.*\)_\ -time: \1\ -title: \2_ -1,$w /dev/stdout -q diff --git a/justfile b/justfile index cb33b7d..f6133f0 100644 --- a/justfile +++ b/justfile @@ -21,27 +21,47 @@ up: html rss # make episodes rss episoderss: - echo "cleric + thief" > www/episodes.xml \ - && echo "http://tilde.town/~dozens/clericthief/index.htmladventures of iofi and maddox" >> www/episodes.xml \ - && echo i \ - | cat - src/index.md ed/blogitem.ed \ - | ed -s \ - | recfmt -f templates/blogitem.rec.template \ - | m4 \ - >> www/episodes.xml \ - && echo '' >> www/episodes.xml + #!/usr/bin/env zsh + echo "cleric + thief" > www/episodes.xml + echo "http://tilde.town/~dozens/clericthief/index.htmladventures of iofi and maddox" >> www/episodes.xml + ed -s << HEREDOC src/index.md | recfmt -f templates/blogitem.rec.template | m4 >> www/episodes.xml + /BEGIN/ka + /END/kb + 1,'ad + 'b,d + %s/^- // + %s,,time: \1|, + %s, - \[\(.*\)\],title: \1|, + %s,(\(.*\))$,source: \1|link: \1|, + %s/html/md/ + %s/|/\\ + /g + ,w /dev/stdout + Q + HEREDOC + echo '' >> www/episodes.xml # make journal rss journalrss: - echo "cleric + thief" > www/journal.xml \ - && echo "http://tilde.town/~dozens/clericthief/index.htmlbehind the scenes of cleric + thief" >> www/journal.xml \ - && echo i \ - | cat - src/journal.md ed/journalitem.ed \ - | ed -s \ - | recfmt -f templates/journalitem.rec.template \ - | m4 \ - >> www/journal.xml \ - && echo '' >> www/journal.xml + #!/usr/bin/env zsh + echo "cleric + thief" > www/journal.xml + echo "http://tilde.town/~dozens/clericthief/index.htmlbehind the scenes of cleric + thief" >> www/journal.xml + ed -s !'markdown src/journal.md' << HEREDOC | recfmt -f templates/journalitem.rec.template | m4 >> www/journal.xml + /BEGIN/ka + /END/kb + 1,'ad + 'b,d + g/^

/+s/^/note: / + v/^note/s/^/+ / + %s/+

/

/ + %s_^

- \(.*\)

_\\ + time: \1\\ + title: \2_ + g/^+ $/d + ,w /dev/stdout + Q + HEREDOC + echo '
' >> www/journal.xml # build all rss rss: episoderss journalrss diff --git a/templates/journalitem.rec.template b/templates/journalitem.rec.template index c6299ac..e7e73b5 100644 --- a/templates/journalitem.rec.template +++ b/templates/journalitem.rec.template @@ -5,11 +5,9 @@ syscmd(`gdate -d {{time}}') changequote()dnl Or else `code blocks` confuse m4 {{note}} changequote`'dnl change quotes `back to default' - ]]>