diff options
Diffstat (limited to 'rss.esh')
-rw-r--r-- | rss.esh | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -0,0 +1,37 @@ | |||
1 | <rss version="2.0"> | ||
2 | <channel> | ||
3 | <title>nerdypepper's μblog</title> | ||
4 | <link>https://peppe.rs</link> | ||
5 | <description>programming, design, software</description> | ||
6 | <link href="https://peppe.rs/index.xml" rel="self" type="application/xml"/> | ||
7 | <image> | ||
8 | <title>nerdypepper logo</title> | ||
9 | <url>https://u.peppe.rs/n.png</url> | ||
10 | <link>https://peppe.rs</link> | ||
11 | </image> | ||
12 | <language>en-us</language> | ||
13 | <copyright>Creative Commons BY-NC-SA 4.0</copyright> | ||
14 | <% for f in `ls -t ./posts`; do | ||
15 | file="./posts/"$f | ||
16 | post_date=$(date -u -r "$file" "+%a, %d %b %y %H:%M:00 %z") | ||
17 | html=$(lowdown "$file") | ||
18 | id="${file##*/}" | ||
19 | id="${id%.*}" | ||
20 | post_title=$(echo "$id" | sed -E -e "s/\..+$//g" -e "s/_(.)/ \u\1/g" -e "s/^(.)/\u\1/g") | ||
21 | post_link="https://peppe.rs/posts/$id/" | ||
22 | |||
23 | echo "<item>" | ||
24 | |||
25 | echo "<title>$post_title</title>" | ||
26 | echo "<description>$html</description>" | ||
27 | echo "<link>$post_link</link>" | ||
28 | echo "<pubDate>$post_date</pubDate>" | ||
29 | echo "<guid>$post_link</guid>" | ||
30 | |||
31 | echo "</item>" | ||
32 | |||
33 | done | ||
34 | %> | ||
35 | |||
36 | </channel> | ||
37 | </rss> | ||