diff options
author | Case Duckworth | 2022-09-22 13:32:30 -0500 |
---|---|---|
committer | Case Duckworth | 2022-09-22 13:34:30 -0500 |
commit | 74785d9b63c383a9807514a57cb490eda4fe8ea2 (patch) | |
tree | 2e7a83d166995058dfae2139ae4cf82167fb23ff | |
parent | Changes (diff) | |
download | shite-74785d9b63c383a9807514a57cb490eda4fe8ea2.tar.gz shite-74785d9b63c383a9807514a57cb490eda4fe8ea2.zip |
Pretty sure this is working enough now
-rwxr-xr-x | shite | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/shite b/shite index aed47c0..ac81a37 100755 --- a/shite +++ b/shite | |||
@@ -19,19 +19,29 @@ expand() { | |||
19 | } | 19 | } |
20 | 20 | ||
21 | body() { | 21 | body() { |
22 | sed 1n | 22 | dog |
23 | } | 23 | } |
24 | 24 | ||
25 | phtml() { | 25 | phtml() { |
26 | sed -e '/./{H;1h;d;};x;s,^[ \n\t]\+,,;s,^[^<].*,<p>&</p>,' | 26 | sed -e '/./{H;1h;$!d;};x;s,^[ \n\t]\+,,;s,^[^<].*,<p>&</p>,' |
27 | } | ||
28 | |||
29 | meta() { | ||
30 | tmp="/tmp/$file.meta" | ||
31 | echo "$tmp" >>/tmp/shite | ||
32 | trap 'rm /tmp/shite' EXIT INT | ||
33 | test -f "$tmp" || sed -n '/<!--/,/-->/p' >"$tmp" | ||
34 | sed -n "s/^$1:[ \t]*//p" "$tmp" | ||
27 | } | 35 | } |
28 | 36 | ||
29 | title() { | 37 | title() { |
30 | sed '1s/\t.*$//;q' | 38 | # sed '1s/\t.*$//;q' |
39 | meta title | ||
31 | } | 40 | } |
32 | 41 | ||
33 | pubdate() { | 42 | pubdate() { |
34 | sed '1s/^[^\t]*\t//;q' | 43 | # sed '1s/^[^\t]*\t//;q' |
44 | meta pubdate | ||
35 | } | 45 | } |
36 | 46 | ||
37 | filters() { | 47 | filters() { |