jojoleprowebsite

[Done] The Sauce of https://jojolepro.com
git clone https://git.jojolepro.com/jojoleprowebsite.git
Log | Files | Refs | README | LICENSE

commit 421ad1d1a2c59c24530daa089c4656338d2531bf
parent dec6973a6af12bbcd4c09de72f650de69704fbeb
Author: Joël Lupien (Jojolepro) <jojolepro@jojolepro.com>
Date:   Mon, 24 Aug 2020 13:20:29 -0400

Create RSS feed

Diffstat:
Mbuild.sh | 33+++++++++++++++++++++++++++++++++
Mbuild/blog/index.html | 1+
Mpublish.sh | 4+++-
Msrc/blog/index.html | 1+
4 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/build.sh b/build.sh @@ -49,3 +49,36 @@ while read -r page; do ;; esac done + +echo Building RSS + +rss='<?xml version="1.0" encoding="UTF-8" ?> +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> +<channel> +<title>Jojolepro Blog</title> +<description>The Blog of the Fockses!</description> +<link>https://www.jojolepro.com</link> +<atom:link href="https://www.jojolepro.com/blog/blog.xml" rel="self" type="application/rss+xml"/>' + +rss_end="</channel> +</rss>" + +item="<item> +<title>{{title}}</title> +<link>https://www.jojolepro.com/blog/{{link}}</link> +</item>" + +echo "$rss" > blog/blog.xml + +cat ../src/blog/index.html | grep -v blog.xml | grep -vE "^$" | +while read -r entry; do +# <a href="2020-08-20_event_chaining">Event Chaining as a Decoupling Method in ECS Game Engines</a> + title1="${entry##*\">}" + title="${title1%%<*}" + link1="${entry##*=\"}" + link="${link1%%\"*}" + echo "$item" | sed "s/{{title}}/$title/" | sed "s/{{link}}/$link/" >> blog/blog.xml +done + +echo "$rss_end" >> blog/blog.xml + diff --git a/build/blog/index.html b/build/blog/index.html @@ -56,6 +56,7 @@ <a href="2020-04-09_simple_school_documents">Simple School Documents</a> <a href="2020-03-31_extracting_data_from_websites">Extracting Data From Websites</a> +<a href="blog.xml">RSS Feed</a> </pre> </article> <br/> diff --git a/publish.sh b/publish.sh @@ -1,2 +1,4 @@ #!/bin/sh -scp -C -r build/* root@jojolepro.com:/var/www/jojolepro.com/ +#scp -C -r build/* root@jojolepro.com:/var/www/jojolepro.com/ +rsync -avp --delete build/* root@jojolepro.com:/var/www/jojolepro.com/ + diff --git a/src/blog/index.html b/src/blog/index.html @@ -4,3 +4,4 @@ <a href="2020-04-09_simple_school_documents">Simple School Documents</a> <a href="2020-03-31_extracting_data_from_websites">Extracting Data From Websites</a> +<a href="blog.xml">RSS Feed</a>