diff options
Diffstat (limited to 'sfeed_html.sh')
-rwxr-xr-x | sfeed_html.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfeed_html.sh b/sfeed_html.sh index 01614ce..b6d21f6 100755 --- a/sfeed_html.sh +++ b/sfeed_html.sh | |||
@@ -85,7 +85,7 @@ html_feed() { # html_feed FEED(file) => HTML | |||
85 | -v ASIDE="$aside" -v limit="$LIMIT" \ | 85 | -v ASIDE="$aside" -v limit="$LIMIT" \ |
86 | 'BEGIN { FS="\t"; fresh_feed = 0; FRESH = (NOW - FRESH_SECS); } | 86 | 'BEGIN { FS="\t"; fresh_feed = 0; FRESH = (NOW - FRESH_SECS); } |
87 | FNR == 1 { nitem = 0; } | 87 | FNR == 1 { nitem = 0; } |
88 | NAME ~ /^\[yt\]/ { sub(/^\[yt\] /, "", NAME); yt = 1; } | 88 | NAME ~ /\[yt\]$/ { sub(/ \[yt\]$/, "", NAME); yt = 1; } |
89 | function unescape(t) { | 89 | function unescape(t) { |
90 | t = html_escape(t); | 90 | t = html_escape(t); |
91 | gsub(/\\\t/,"\t",t); | 91 | gsub(/\\\t/,"\t",t); |
@@ -151,10 +151,10 @@ html_feed() { # html_feed FEED(file) => HTML | |||
151 | echo "<section id=\"$filename\">" | 151 | echo "<section id=\"$filename\">" |
152 | # TODO: Include a link back to the website | 152 | # TODO: Include a link back to the website |
153 | case "$filename" in | 153 | case "$filename" in |
154 | \[yt\]*) yt=" class=\"yt\"" ;; | 154 | *\[yt\]) yt=" class=\"yt\"" ;; |
155 | *) yt="" ;; | 155 | *) yt="" ;; |
156 | esac | 156 | esac |
157 | fn="$(echo "$filename" | sed 's@^\[yt\]@@')" | 157 | fn="$(echo "$filename" | sed 's@ \[yt\]$@@')" |
158 | printf '<header><h2%s><a href="#%s">#</a> %s</h2>\n' "$yt" "$filename" "$fn" | 158 | printf '<header><h2%s><a href="#%s">#</a> %s</h2>\n' "$yt" "$filename" "$fn" |
159 | echo "<span class=\"flinks\">" | 159 | echo "<span class=\"flinks\">" |
160 | if [ -f "$SFEED_DATA/urls/$filename" ]; then | 160 | if [ -f "$SFEED_DATA/urls/$filename" ]; then |