diff options
author | b4rkod <lllillilll@protonmail.com> | 2024-07-11 23:46:51 +0300 |
---|---|---|
committer | b4rkod <lllillilll@protonmail.com> | 2024-07-11 23:46:51 +0300 |
commit | 540058c54375607bceb2ddf681b58a30e5f9e819 (patch) | |
tree | 44b1a751a585dc5dc2199cdd1a7b05d6f13e3e45 /test/rss_creator.sh | |
parent | d5365fe018f8adda443c5512e3e390186a19d32e (diff) |
things added
Diffstat (limited to 'test/rss_creator.sh')
-rwxr-xr-x | test/rss_creator.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/rss_creator.sh b/test/rss_creator.sh new file mode 100755 index 0000000..f30c0b1 --- /dev/null +++ b/test/rss_creator.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +. ~/.config/b4rcms/basics.sh + +echo '<?xml version="1.0" encoding="UTF-8" ?>' +echo \ "<rss version=\"2.0\"> + +<channel> + <title>B4rkod's Basement</title> + <link>https://b4rkod.net.tr/rss.xml</link> + <description>My Basement's Window</description> + <!--item-->]> " + +for LINE in $( tac $DB/blogposts.txt ); do + DATE=$(date -d @$(echo $LINE | cut -c -10) -R) + BASE=$(echo $LINE| cut -c 12-) + FILE=$(cat $ROOT/blogposts/$BASE) + echo \ " +<item> + <pubDate>$DATE</pubDate> + <guid>https://b4rkod.net.tr/$BASE</guid> + <title>$BASE</title> + <link>https://b4rkod.net.tr/blogposts/$BASE</link> + <description><![CDATA[ + $FILE + ]]></description> +</item>" + +done + + +echo \ " +</channel> +</rss> +" + + |