mirror of https://github.com/Mroik/ttbp-rssgen.git
Removed unecessary '>>'
parent
3c754bd22c
commit
2ac5e14809
36
rssgen.sh
36
rssgen.sh
|
@ -9,25 +9,31 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $location
|
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $location
|
||||||
echo "<rss version=\"2.0\">" >> $location
|
{
|
||||||
echo "<channel>" >> $location
|
echo "<rss version=\"2.0\">"
|
||||||
echo "<title>~$user on TTBP</title>" >> $location
|
echo "<channel>"
|
||||||
echo "<link>http://tilde.town/~$user/blog/</link>" >> $location
|
echo "<title>~$user on TTBP</title>"
|
||||||
echo "<updated>$(date)</updated>" >> $location
|
echo "<link>http://tilde.town/~$user/blog/</link>"
|
||||||
echo "<description>$user's blog on tilde.town</description>" >> $location
|
echo "<updated>$(date)</updated>"
|
||||||
|
echo "<description>$user's blog on tilde.town</description>"
|
||||||
|
} >> $location
|
||||||
|
|
||||||
for x in $(ls /home/$user/.ttbp/entries)
|
for x in $(ls /home/$user/.ttbp/entries)
|
||||||
do
|
do
|
||||||
echo "<item>" >> $location
|
{
|
||||||
echo "<title>$(echo $x | sed -E s/\.txt//g)</title>">> $location
|
echo "<item>"
|
||||||
echo "<pubDate>$(echo $x | awk '{printf substr($0,1,4) "-" substr($0,5,2) "-" substr($0,7,2)}')</pubDate>" >> $location
|
echo "<title>$(echo $x | sed -E s/\.txt//g)</title>"
|
||||||
echo "<link>http://tilde.town/~$user/blog/$(echo $x | sed -E s/\.txt/\.html/)</link>" >> $location
|
echo "<pubDate>$(echo $x | awk '{printf substr($0,1,4) "-" substr($0,5,2) "-" substr($0,7,2)}')</pubDate>"
|
||||||
echo "<description><![CDATA[$(cat /home/$user/.ttbp/entries/$x)]]></description>" >> $location
|
echo "<link>http://tilde.town/~$user/blog/$(echo $x | sed -E s/\.txt/\.html/)</link>"
|
||||||
echo "<author>$user@tilde.town</author>" >> $location
|
echo "<description><![CDATA[$(cat /home/$user/.ttbp/entries/$x)]]></description>"
|
||||||
echo "</item>" >> $location
|
echo "<author>$user@tilde.town</author>"
|
||||||
|
echo "</item>"
|
||||||
|
} >> $location
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "</channel>" >> $location
|
{
|
||||||
echo "</rss>" >> $location
|
echo "</channel>"
|
||||||
|
echo "</rss>"
|
||||||
|
} >> $location
|
||||||
|
|
||||||
echo "Finished generating rss feed... you can now go to $(echo $location | sed -E "s/^.*public_html/http:\/\/tilde\.town\/~$user/")"
|
echo "Finished generating rss feed... you can now go to $(echo $location | sed -E "s/^.*public_html/http:\/\/tilde\.town\/~$user/")"
|
||||||
|
|
Loading…
Reference in New Issue