From 74785d9b63c383a9807514a57cb490eda4fe8ea2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 22 Sep 2022 13:32:30 -0500 Subject: Pretty sure this is working enough now --- shite | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/shite b/shite index aed47c0..ac81a37 100755 --- a/shite +++ b/shite @@ -19,19 +19,29 @@ expand() { } body() { - sed 1n + dog } phtml() { - sed -e '/./{H;1h;d;};x;s,^[ \n\t]\+,,;s,^[^<].*,

&

,' + sed -e '/./{H;1h;$!d;};x;s,^[ \n\t]\+,,;s,^[^<].*,

&

,' +} + +meta() { + tmp="/tmp/$file.meta" + echo "$tmp" >>/tmp/shite + trap 'rm /tmp/shite' EXIT INT + test -f "$tmp" || sed -n '//p' >"$tmp" + sed -n "s/^$1:[ \t]*//p" "$tmp" } title() { - sed '1s/\t.*$//;q' + # sed '1s/\t.*$//;q' + meta title } pubdate() { - sed '1s/^[^\t]*\t//;q' + # sed '1s/^[^\t]*\t//;q' + meta pubdate } filters() { -- cgit 1.4.1-21-gabe81