diff options
Diffstat (limited to '')
-rwxr-xr-x | rs.sh | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -1,6 +1,5 @@ #!/bin/sh # Seen, a simple static blog generator -# # Copyright (C) 2021 Vitali64 <vitali64pmemail@protonmail.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -12,19 +11,14 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. - die() { echo "-> [$(date +%R)] (!) ERROR: Unexpected error, please report : $1 (!)" exit 1 } - # Articles articles="$(find articles/*.md|sed -e 's@.md@@g' -e 's@articles/@@g')" || die "Unknown error" - echo "-> [$(date +%R)] Generating RSS feed ..." - touch "www/rss.xml" - # Set the defaults rssBlogTitle="blog" rssBlogDescription="It's a blog" @@ -35,7 +29,6 @@ printf '%s\n' '<channel>' >> "www/rss.xml" printf '%s\n' "<title>${rssBlogTitle}</title>" >> "www/rss.xml" printf '%s\n' "<link>BLANK</link>" >> "www/rss.xml" printf '%s\n' "<description>$rssBlogDescription</description>" >> "www/rss.xml" - # Items for line in ${articles} do @@ -46,7 +39,6 @@ do printf '%s\n' "<description>$(cat articles/${line}.md)</description>" >> "www/rss.xml" printf '%s\n' '</item>' >> "www/rss.xml" done - # Footer of the RSS XMLÂ file printf '%s\n' '</channel>' >> "www/rss.xml" printf '%s\n' '</rss>' >> "www/rss.xml" |