diff options
| author | Marc Vertes <mvertes@free.fr> | 2023-05-18 18:59:44 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2023-05-18 18:59:44 +0200 |
| commit | 999073d07721f90afcb169ae43a4192a79f0b863 (patch) | |
| tree | 8b0138e35a4a9e1aeff6f81bc1a41b2656d6d4fe /genrss.sh | |
| parent | b070f93bb8159a12021c5ec9c2c156ad281a6024 (diff) | |
generate feed.xml
Diffstat (limited to 'genrss.sh')
| -rwxr-xr-x | genrss.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/genrss.sh b/genrss.sh new file mode 100755 index 0000000..7e5d3b3 --- /dev/null +++ b/genrss.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +. ./meta.sh +cat <<- EOT + <?xml version="1.0" encoding="UTF-8"?> + <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"> + <channel> + <title>$title</title> + <link>$link/</link> + <description>$description</description> + <managingEditor>mvertes@free.fr</managingEditor> + <pubDate>$(date -R)</pubDate> +EOT + +for d in *; do + [ -d "$d" ] || continue + cd $d + . ./meta.sh + cat <<- EOT + <item> + <title>$title</title> + <link>$link/$d/</link> + <description>$description</description> + <author>$author</author> + <pubDate>$date_rfc2822</pubDate> + <content:encoded><![CDATA[$(awk '/<h1 / {p=!p} p' index.html)]]> + </item> + EOT +done + +cat <<- EOT + </channel> + </rss> +EOT |
