aboutsummaryrefslogtreecommitdiff
path: root/rss.esh
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-03-11 18:23:26 +0000
committerAkshay <[email protected]>2020-03-11 18:23:26 +0000
commit9e8fbb5f2bb41e712e9680f825d238181876f45c (patch)
tree6df6c5b784b68ae3d06103939d46f5860ce1e9e7 /rss.esh
parent64cc97395d0541c1bbfc1df58f0351d9b8332c6b (diff)
finish up rss feeds
Diffstat (limited to 'rss.esh')
-rw-r--r--rss.esh37
1 files changed, 37 insertions, 0 deletions
diff --git a/rss.esh b/rss.esh
new file mode 100644
index 0000000..941ccd7
--- /dev/null
+++ b/rss.esh
@@ -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>