Fixed broken pubdate and added missing GUIDs
This commit is contained in:
@ -2,86 +2,86 @@
|
||||
{
|
||||
"title":"",
|
||||
"published_date":"",
|
||||
"guid":""
|
||||
"guid":"599b49d9-02bb-4195-a836-d4ecab7176b6"
|
||||
},
|
||||
{
|
||||
"title":"The First Entry",
|
||||
"published_date":"Thu, 20 Jun 2019 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"5242211d-7d5b-4b08-a8d3-663f4179b180"
|
||||
},
|
||||
{
|
||||
"title":"The Migration",
|
||||
"published_date":"Wed, 07 Aug 2019 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"ccdb8b82-3d2d-40db-b53b-604fb0df331c"
|
||||
},
|
||||
{
|
||||
"title":"Configuring Dynamic DNS Records",
|
||||
"published_date":"Thu, 29 Aug 2019 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"147cceef-d39f-4c1a-84f9-f341f8054655"
|
||||
},
|
||||
{
|
||||
"title":"? Matched Expression Does Not Match in Perl",
|
||||
"published_date":"Wed, 18 Sep 2019 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"f6973140-6ceb-4ea0-a984-39ececdfec04"
|
||||
},
|
||||
{
|
||||
"title":"The SBC Change",
|
||||
"published_date":"Mon, 02 Mar 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"e4fb48f1-8263-47b7-9284-ffded0ee172e"
|
||||
},
|
||||
{
|
||||
"title":"A Hit of Kubernetes",
|
||||
"published_date":"Thu, 21 May 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"d3880905-251f-423b-9b9c-f3a9ca6bc48f"
|
||||
},
|
||||
{
|
||||
"title":"Optimizing Web Pages and File Sizes",
|
||||
"published_date":"Fri, 22 May 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"af6fa2dd-0e3b-4f1e-a433-f0e2090c249c"
|
||||
},
|
||||
{
|
||||
"title":"Some Website Design and CSS",
|
||||
"published_date":"Mon, 08 Jun 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"788b1e65-8f5f-461d-88da-74198f8e3dbd"
|
||||
},
|
||||
{
|
||||
"title":"Git and Bash The Site",
|
||||
"published_date":"Thu, 02 Jul 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"8dc020ec-bb2a-4b6b-8d2a-de87af633a5b"
|
||||
},
|
||||
{
|
||||
"title":"A Birth In The Family",
|
||||
"published_date":"Sun, 26 Jul 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"1b1cce91-3259-4af3-ac5d-f253bb073a5e"
|
||||
},
|
||||
{
|
||||
"title":"Programming Anxiety",
|
||||
"published_date":"Thu, 13 Aug 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"50669054-16ba-4784-ac35-40d94fbf2667"
|
||||
},
|
||||
{
|
||||
"title":"LXC and Friends",
|
||||
"published_date":"Thu, 20 Aug 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"1e258c76-5f58-4471-b0f3-31fdf263d2c7"
|
||||
},
|
||||
{
|
||||
"title":"Migrating Everything to Proxmox - Part 1",
|
||||
"published_date":"Mon, 30 Nov 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"acedd608-a4cc-4c93-a894-37995d61bb65"
|
||||
},
|
||||
{
|
||||
"title":"A Brief Goodbye to CentOS",
|
||||
"published_date":"Wed, 09 Dec 2020 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"a9e058ac-7811-464b-8aef-735b6aa6e219"
|
||||
},
|
||||
{
|
||||
"title":"A Walk Along The Side",
|
||||
"published_date":"Tue, 27 Jul 2021 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"490c8b5e-c811-46e3-a3bf-6c9cfaccf8d9"
|
||||
},
|
||||
{
|
||||
"title":"A Taste of Progress",
|
||||
"published_date":"Sat, 23 Oct 2021 00:00:00 +0800",
|
||||
"guid":""
|
||||
"guid":"13dee0f1-8bb9-4f81-a8fc-2994ec4b4b33"
|
||||
}
|
||||
]}
|
||||
|
@ -4,12 +4,12 @@
|
||||
<link>https://www.clementchiew.me.</link>
|
||||
<description> </description>
|
||||
<language>en-us</language>
|
||||
<pubDate>$pubdate</pubDate>
|
||||
<lastBuildDate>$pubdate</lastBuildDate>
|
||||
<pubDate>PUBDATE</pubDate>
|
||||
<lastBuildDate>PUBDATE</lastBuildDate>
|
||||
<docs>https://www.clement.chiew/blog/rss</docs>
|
||||
<generator>Some random bash scripts</generator>
|
||||
<managingEditor>clementchiew@disroot.org</managingEditor>
|
||||
<webMaster>clementchiew@disroot.org</webMaster>
|
||||
<managingEditor>clementchiew95@disroot.org (Clement Chiew)</managingEditor>
|
||||
<webMaster>clementchiew95@disroot.org (Clement Chiew)</webMaster>
|
||||
$itemlist
|
||||
</channel>
|
||||
</rss>
|
||||
|
@ -48,15 +48,16 @@ itemlinereplace=$(grep -n '$item' .rss.item.template | cut -f1 -d:)
|
||||
|
||||
# build rss feed
|
||||
cat \
|
||||
<(head -n $(( linereplace -1 )) .rss.template) \
|
||||
<(head -n $(( linereplace -1 )) .rss.template |
|
||||
sed "s/PUBDATE/$(date -R)/" ) \
|
||||
<(
|
||||
for ((i=1;i<10;i++))
|
||||
do
|
||||
itemnum=$(( CONTENTNUM - i ))
|
||||
padint=$(printf %03d $itemnum)
|
||||
title=$(jq '.data | .['"$padint"'].title' .data.json )
|
||||
pubdate=$(jq '.data | .['"$padint"'].published_date' .data.json )
|
||||
guid=$(jq '.data | .['"$padint"'].guid' .data.json )
|
||||
title=$(jq -r '.data | .['"$padint"'].title' .data.json )
|
||||
pubdate=$(jq -r '.data | .['"$padint"'].published_date' .data.json )
|
||||
guid=$(jq -r '.data | .['"$padint"'].guid' .data.json )
|
||||
cat \
|
||||
<(head -n $(( itemlinereplace -1 )) .rss.item.template |
|
||||
sed "s/TITLE/$title/;
|
||||
@ -64,7 +65,7 @@ cat \
|
||||
) \
|
||||
<(cat content-$padint quote-$padint |
|
||||
tidy -q -asxml |
|
||||
xq -cx '.html.body' ) \
|
||||
xq -rcx '.html.body' ) \
|
||||
<(tail -n +$(( itemlinereplace +1 )) .rss.item.template |
|
||||
sed "s/PUBDATE/$pubdate/;
|
||||
s/GUID/$guid/"
|
||||
|
Reference in New Issue
Block a user