blob: 69877451493fbc7b0f928b15bbb5bf0233576047 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/sh
# Generates an RSS feed from all posts.
cat << EOH
content-type: application/xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xml>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>53hornet's Feed</title>
<link>https://www.53hor.net</link>
<atom:link href="https://www.53hor.net/rss.xml" rel="self" type="application/rss+xml" />
<description>The World Wide Web pages of Adam Carpenter</description>
<image>
<url>https://www.53hor.net/includes/logo_diag.png</url>
<title>53hornet's Feed</title>
<link>https://www.53hor.net</link>
</image>
EOH
grep '<h1>' posts/*\
| sort -r\
| sed -e 's#h1#title#g' -e 's#:#</link>#' -e 's#$#</item>#' -e 's#^#<item><link>https://www.53hor.net/#'
echo '</channel></rss>'
|