diff options
Diffstat (limited to 'phlogrss')
| -rwxr-xr-x | phlogrss | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -2,8 +2,7 @@ # create a gopher rss feed -cd "$HOME/src/gopher/phlog" || exit - +root="$HOME/src/gopher/phlog" phloglink="gopher://spike.nagatha.fr/1/phlog" description="Phil's Phlog" rsslink="gopher://spike.nagatha.fr/0/phlog/rss.xml" @@ -11,6 +10,8 @@ filename="$HOME/src/gopher/phlog/rss.xml" builddate=$(date --iso-8601=ns) buildyear=$(date +%Y) +cd $root || exit + # Build RSS header & footer build_header () { echo "<?xml version='1.0' encoding='UTF-8' ?> @@ -40,7 +41,7 @@ build_item () { <pubDate>$postdate</pubDate> <link>$linkadd</link> <guid>$linkadd</guid> - <description>$description</description> + <description><![CDATA[$description]]></description> </item>" >> ~/feed } @@ -69,7 +70,7 @@ for dir in "${dir_array[@]}"; do title=$(head -n1 "$post/gophermap") postdate=$(cat "$post/gophermap" | sed -n '2p') linkadd="$phloglink/$post" - description="$(cat "$post/gophermap" | sed -n "/^$/,/^$/p" | head --lines 3) …" + description="$(cat "$post/gophermap" | sed -n "/^$/,/^$/p" | head -n 3 )..." build_item "$post" done |
