aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-09-28 09:57:32 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-09-28 09:57:32 +0200
commitb00c34342587cfcbb3b9ad357df01fc002182a3a (patch)
tree8173e3f0ca0d56c375549193c3bf0ae16279386c
parent853ee546372969cb91420533623d76e9363e952d (diff)
downloadrgoncalves.se-b00c34342587cfcbb3b9ad357df01fc002182a3a.tar.gz
rssg: More informations and deterministic guid
-rwxr-xr-xbin/rssg8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/rssg b/bin/rssg
index bceb624..59f0797 100755
--- a/bin/rssg
+++ b/bin/rssg
@@ -13,8 +13,13 @@ cat <<-EOF > "${rss_out_file}"
<description>${website_description}</description>
<link>${website_link}</link>
<copyright>$(date +"%Y") ${website_title} - All rights reserved</copyright>
+<managingEditor>${website_email}</managingEditor>
+<webMaster>${website_email}</webMaster>
<lastBuildDate>${current_date}</lastBuildDate>
<pubDate>${current_date}</pubDate>
+<generator>${website_generator}</generator>
+<language>${website_language}</language>
+<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<ttl>1800</ttl>
EOF
@@ -22,11 +27,14 @@ for file in $(__list_files_date "${rss_dir}"); do
title=$(__get_value_title "${file}")
date=$(__get_value_date_publication "${file}")
link="${website_link}/$(__get_final_filename ${file})"
+ guid="$(echo ${link} | sha256)"
+
cat <<-EOF >> "${rss_out_file}"
<item>
<title>${title}</title>
<link>${link}</link>
<pubDate>${date}</pubDate>
+ <guid>${guid}</guid>
</item>
EOF
done
remember that computers suck.