Fixed broken dates and updated docs
This commit is contained in:
@ -1,13 +1,9 @@
|
||||
<item>
|
||||
<title>TITLE</title>
|
||||
<link>
|
||||
https://www.clementchiew.me/blog/blog-CURRENTINT
|
||||
</link>
|
||||
<link>https://www.clementchiew.me/blog/blog-CURRENTINT</link>
|
||||
<description>
|
||||
$item
|
||||
</description>
|
||||
<pubDate>PUBDATE</pubDate>
|
||||
<guid>
|
||||
GUID
|
||||
</guid>
|
||||
<guid>GUID</guid>
|
||||
</item>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>My Little Spot</title>
|
||||
<link>https://www.clementchiew.me.</link>
|
||||
<link>https://www.clementchiew.me</link>
|
||||
<description> </description>
|
||||
<language>en-us</language>
|
||||
<pubDate>PUBDATE</pubDate>
|
||||
<lastBuildDate>PUBDATE</lastBuildDate>
|
||||
<docs>https://www.clement.chiew/blog/rss</docs>
|
||||
<docs>https://www.rssboard.org/rss-specification</docs>
|
||||
<generator>Some random bash scripts</generator>
|
||||
<managingEditor>clementchiew95@disroot.org (Clement Chiew)</managingEditor>
|
||||
<webMaster>clementchiew95@disroot.org (Clement Chiew)</webMaster>
|
||||
|
@ -53,22 +53,22 @@ cat \
|
||||
<(
|
||||
for ((i=1;i<10;i++))
|
||||
do
|
||||
itemnum=$(( CONTENTNUM - i ))
|
||||
padint=$(printf %03d $itemnum)
|
||||
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 )
|
||||
export padint=$( printf %03d $(( CONTENTNUM -i )) )
|
||||
cat \
|
||||
<(head -n $(( itemlinereplace -1 )) .rss.item.template |
|
||||
sed "s/TITLE/$title/;
|
||||
s/CURRENTINT/$padint/"
|
||||
<(
|
||||
head -n $(( itemlinereplace -1 )) .rss.item.template |
|
||||
title=$(jq -r '.data | .['"$padint"'].title' .data.json ) \
|
||||
perl -pe 's/TITLE/$ENV{title}/; s/CURRENTINT/$ENV{padint}/'
|
||||
) \
|
||||
<(cat content-$padint quote-$padint |
|
||||
<(
|
||||
cat content-$padint quote-$padint |
|
||||
tidy -q -asxml |
|
||||
xq -cx '.html.body' ) \
|
||||
<(tail -n +$(( itemlinereplace +1 )) .rss.item.template |
|
||||
sed "s/PUBDATE/$pubdate/;
|
||||
s/GUID/$guid/"
|
||||
<(
|
||||
tail -n +$(( itemlinereplace +1 )) .rss.item.template |
|
||||
pubdate=$(jq -r '.data | .['"$padint"'].published_date' .data.json ) \
|
||||
guid=$(jq -r '.data | .['"$padint"'].guid' .data.json ) \
|
||||
perl -pe 's/PUBDATE/$ENV{pubdate}/; s/GUID/$ENV{guid}/'
|
||||
)
|
||||
done
|
||||
) \
|
||||
|
Reference in New Issue
Block a user