diff options
| -rw-r--r-- | http/Makefile | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | http/bin/blog | 0 | ||||
| -rwxr-xr-x | http/bin/cut_longlog_meta | 34 |
3 files changed, 35 insertions, 1 deletions
diff --git a/http/Makefile b/http/Makefile index 3f20d3f..fd865b5 100644 --- a/http/Makefile +++ b/http/Makefile @@ -11,7 +11,7 @@ src/microlog: $(shell find -L blogs/microlog -type f) bin/blog blog: src/blog src/blog: $(shell find -L blogs/blog -type f) bin/blog - ./bin/blog -i blog -l blog -p gmi2upphtml + ./bin/blog -i blog -l blog -p 'cut_longlog_meta | gmi2upphtml' .PHONY: clean clean: diff --git a/http/bin/blog b/http/bin/blog index 357b2bc..357b2bc 100644..100755 --- a/http/bin/blog +++ b/http/bin/blog diff --git a/http/bin/cut_longlog_meta b/http/bin/cut_longlog_meta new file mode 100755 index 0000000..914f455 --- /dev/null +++ b/http/bin/cut_longlog_meta @@ -0,0 +1,34 @@ +#!/bin/sh -e + +meta="" +read_published_on=0 +while read line +do + meta="${meta} +${line}" + if [ "$(echo "$line" | cut -c1-14)" = "Published on: " ] + then + read_published_on=1 + break + fi +done + +if [ "$read_published_on" -eq 0 ] +then + echo "$meta" + exit 0 +fi + +read line +if [ "$(echo "$line" | cut -c1-14)" = "Updated: " ] +then + meta="${meta} +${line}" +else + echo "$line" +fi + +while read line +do + echo "$line" +done |
