diff options
-rwxr-xr-x | auto.sh | 1 | ||||
-rw-r--r-- | blogs/output/rss.xml | 29 | ||||
-rwxr-xr-x | rss.sh | 38 |
3 files changed, 68 insertions, 0 deletions
@@ -1,5 +1,6 @@ while true; do git pull origin master ./blogger.sh + ./rss.sh sleep 3600 done diff --git a/blogs/output/rss.xml b/blogs/output/rss.xml new file mode 100644 index 0000000..51e68b5 --- /dev/null +++ b/blogs/output/rss.xml @@ -0,0 +1,29 @@ + +<?xml version=1.0 encoding=UTF-8 ?> +<rss version=2.0> + +<channel> + <title>Thing 1's blog</title> + <link>https://seacrossedlovers.xyz/blogger/blogs/output/index.html</link> + <description>Definatly exists</description> + + + <item> + <title>first---1.2.25</title> + <link>https://seacrossedlovers.xyz/blogger/blogs/output/first---1.2.25</link> + <description> +* Wow! look at this blog +Isn't it amazing, I know it is right, some content finally came onto this site, it's as if someone is running it. I want to use these blogs as a pseudo dirary sorta thing. I dont really expect them to be read but if someone does then I suppose thats a win. + +I suppose a good place to start with is who am I. Well im a lot of things, notably a nerd, so thats why you can read this page at all, I like righting clean code in C, with no nonsense librarys or anything like that (looking at you CMake), I like small command line editors like vim, but as of writing I'm using kakoune, it's a new years resolution of sort but I dont really believe in them, oh well :). (If you read this far the best thing to take away is to try kakoune). + +On other things obvously I'm a linux guy but I doubt that needed to be said, you probably are too if your reading this drivel. + +If your somehow intressed in the stuff I'm using to make this blog (Shokingly its not hand writen html), its a small tool I just through together called blogger, which consists of about ~50 of shell and C code combind, none of it is very good but it doesn't need to be, it's working so far. + </description> + </item> + + +</channel> +</rss> + @@ -0,0 +1,38 @@ +#!/bin/sh + +blogfile="./blogs" +link="https://seacrossedlovers.xyz/blogger/blogs/output" +rss="./blogs/output/rss.xml" + + +echo """ +<?xml version="1.0" encoding="UTF-8" ?> +<rss version="2.0"> + +<channel> + <title>Thing 1's blog</title> + <link>${link}/index.html</link> + <description>Definatly exists</description> +""" > $rss + +blogs=$(ls $blogfile/*.blog) +for i in $blogs; do + out=$(echo $i | rev | cut -d '/' -f 1 | cut -d '.' -f 2- | rev) + contents=$(cat $i | head) + + echo """ + <item> + <title>${out}</title> + <link>${link}/${out}</link> + <description>${contents} + </description> + </item> + """ >> $rss +done + + + +echo """ +</channel> +</rss> +""" >> $rss |