diff options
author | Case Duckworth | 2022-08-14 01:49:52 -0500 |
---|---|---|
committer | Case Duckworth | 2022-08-14 01:49:52 -0500 |
commit | 5dabf589813e74adbebacddd78a3f2bb4eecfd9c (patch) | |
tree | 671c8a5f3b174bfe58cc8bf1c76318b8abcbbd37 | |
parent | Fix styling (diff) | |
download | sfeed-5dabf589813e74adbebacddd78a3f2bb4eecfd9c.tar.gz sfeed-5dabf589813e74adbebacddd78a3f2bb4eecfd9c.zip |
Better-format my weed
-rwxr-xr-x | sfeed_weed.awk | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sfeed_weed.awk b/sfeed_weed.awk index ccc3521..2b5d102 100755 --- a/sfeed_weed.awk +++ b/sfeed_weed.awk | |||
@@ -32,7 +32,14 @@ BEGIN { | |||
32 | datecmd | getline published | 32 | datecmd | getline published |
33 | close(datecmd) | 33 | close(datecmd) |
34 | gsub(/\\t/, "\t", content) | 34 | gsub(/\\t/, "\t", content) |
35 | gsub(/\\n/, "\n", content) | 35 | if (title ~ /\[acdw\]/) { |
36 | print "acdw" | ||
37 | sub(/^/, "<p>", content) | ||
38 | gsub(/\\n\\n/, "\\n<p>", content) | ||
39 | gsub(/\\n/, "\n", content) | ||
40 | } else { | ||
41 | gsub(/\\n/, "\n", content) | ||
42 | } | ||
36 | gsub(/\\/, "\\", content) | 43 | gsub(/\\/, "\\", content) |
37 | print "<article>" | 44 | print "<article>" |
38 | print "<header><h2>" title "</h2>" | 45 | print "<header><h2>" title "</h2>" |