about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-09-22 13:32:30 -0500
committerCase Duckworth2022-09-22 13:34:30 -0500
commit74785d9b63c383a9807514a57cb490eda4fe8ea2 (patch)
tree2e7a83d166995058dfae2139ae4cf82167fb23ff
parentChanges (diff)
downloadshite-74785d9b63c383a9807514a57cb490eda4fe8ea2.tar.gz
shite-74785d9b63c383a9807514a57cb490eda4fe8ea2.zip
Pretty sure this is working enough now
-rwxr-xr-xshite18
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
21body() { 21body() {
22 sed 1n 22 dog
23} 23}
24 24
25phtml() { 25phtml() {
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
29meta() {
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
29title() { 37title() {
30 sed '1s/\t.*$//;q' 38 # sed '1s/\t.*$//;q'
39 meta title
31} 40}
32 41
33pubdate() { 42pubdate() {
34 sed '1s/^[^\t]*\t//;q' 43 # sed '1s/^[^\t]*\t//;q'
44 meta pubdate
35} 45}
36 46
37filters() { 47filters() {