aboutsummaryrefslogtreecommitdiffstats
path: root/bin/rssg
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rssg')
-rwxr-xr-xbin/rssg14
1 files changed, 6 insertions, 8 deletions
diff --git a/bin/rssg b/bin/rssg
index d42ff14..aee5735 100755
--- a/bin/rssg
+++ b/bin/rssg
@@ -5,7 +5,6 @@
set -e
current_date=$(date +"%a, %d %b %Y %H:%M:%S %z")
-uname=$(uname)
cat <<-EOF > "${rss_out_file}"
<rss version="2.0">
@@ -25,21 +24,20 @@ cat <<-EOF > "${rss_out_file}"
EOF
for file in $(__list_files_date "${rss_dir}"); do
+ __get_value "${file}" "draft" >/dev/null && continue
+
title=$(__get_value_title "${file}")
date=$(__get_value_date_publication "${file}")
- link="${website_link}/$(__get_final_filename ${file})"
- if [ "${uname}" = "Linux" ]; then
- guid="$(echo ${link} | sha256sum | cut -d ' ' -f 1)"
- else
- guid="$(echo ${link} | sha256)"
- fi
-
+ link="${website_link}/$(__get_final_filename "${file}")"
+ guid="$(echo "${link}" | "${__sha256}" | cut -d ' ' -f 1)"
+ description=$(__generate_rss_body "${file}")
cat <<-EOF >> "${rss_out_file}"
<item>
<title>${title}</title>
<link>${link}</link>
<pubDate>${date}</pubDate>
<guid>${guid}</guid>
+ <description>${description}</description>
</item>
EOF
done
remember that computers suck.