ssh git@grit.deadkey.org man

mailmanpat/jenny · 2026-09-06 09:36:46 +08002026-9-6 +8git clone …

FILES / test / fixtures / legacy-blog / .layout / rss2.sh

NameLast CommitTimestampSize
..
index.sh ad9c389 h test: replace the cloned-blog CI job with a committed fixture 26-08-24 11:38 3 KB
post.sh ad9c389 h test: replace the cloned-blog CI job with a committed fixture 26-08-24 11:38 3 KB
rss2.sh ad9c389 h test: replace the cloned-blog CI job with a committed fixture 26-08-24 11:38 688 B
#!/bin/bash
# Break apart the LIST payload
IFS='✂︎' read -r -a array <<< "$LIST"
function index_loop {
for (( idx=${#array[@]}-1 ; idx>=0 ; idx-- )) ; do
[ "${array[idx]}" ] && eval "${array[idx]} list_item"
done
}
function list_item {
cat << _LOOP_
<item>
<title>$(echo $POST_TITLE)</title>
<link>$(echo $BLOG_HOST)$(echo $POST_URL)</link>
<description>Posted on $(echo $POST_DATE)</description>
<pubDate>$(echo $POST_DATE_RFC822)</pubDate>
</item>
_LOOP_
}
cat << _EOF_
<?xml version="1.0" ?>
<rss version="2.0">
<channel>
<title>$(echo $BLOG_TITLE)</title>
<link>$(echo $BLOG_HOST)</link>
<description></description>
$(index_loop)
</channel>
</rss>
_EOF_