rss feed builds relative links if server and port suppressed

This commit is contained in:
James Tomasino 2018-05-01 22:23:48 -04:00
parent 42892d8cfb
commit 93e1c41e9c
1 changed files with 1 additions and 1 deletions

2
burrow
View File

@ -488,7 +488,7 @@ make_rss () {
printf " <description><![CDATA[<pre>\\n"
if printf "%s" "$filename" | grep -q "gophermap$"
then
awk -F"\\t" '/^[2-9\+GITs].*\t/ {print $0; next} /^h.*\t/ { l=substr($1, 2, length($1)); print l "\n " substr($2, 5, length($2)); next } /^[0-1].*\t/ { l=substr($1, 2, length($1)); t=substr($1,1,1); print l "\n gopher://" $3 "/" t $2; next } {sub(/^i/, "", $1);print $1}' "$f"
awk -v server="${config_gopher_server}" -v port="${config_gopher_port}" -F"\\t" '/^[2-9\+GITs].*\t/ {print $0; next} /^h.*\t/ { l=substr($1, 2, length($1)); print l "\n " substr($2, 5, length($2)); next } /^[0-1].*\t/ { l=substr($1, 2, length($1)); t=substr($1,1,1); (!$3) ? s=server : s=$3; print l "\n gopher://" s "/" t $2; next } {sub(/^i/, "", $1);print $1}' "$f"
else
cat "$f"
fi