Skip to content

Instantly share code, notes, and snippets.

@ghomasHudson
Created July 21, 2021 15:13
Show Gist options
  • Save ghomasHudson/263c0d3fc846e63fa6345ce65ffbd317 to your computer and use it in GitHub Desktop.
Save ghomasHudson/263c0d3fc846e63fa6345ce65ffbd317 to your computer and use it in GitHub Desktop.
Bash script to build podcast rss feed from the Trendy Talk gemini page
#!/bin/sh
echo '<?xml version="1.0" encoding="UTF-8"?>'
echo '<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">'
echo '<channel>'
echo '<itunes:image href="https://share.tube/lazy-static/avatars/bfce2eb1-82b3-4490-88d1-c7ca034a5745.jpg"/>'
echo '<title>Trendy Talk</title>'
echo '<link>https://portal.mozz.us/gemini/gem.chriswere.uk/trendytalk/</link>'
echo "<description>Trendy Talk is an often gemini-centric punk as heck pseudo-podcast from the Internet's ChrisWere, Uoou and HexDSL. It has no schedule, no theme and no format to follow. It may however be the best gemini podcast on the whole smol-internet. So you are welcome.</description>"
curl -sL https://portal.mozz.us/gemini/gem.chriswere.uk/trendytalk/ | grep '.ogg' | sed -E 's/<a href="/<item>\n <enclosure url="https:\/\/proxy.vulpes.one/; s/">/" type="audio\/ogg"><\/enclosure>\n <pubDate>/; s/ - /<\/pubDate>\n <title>/; s/<\/a><br\/>/<\/title>\n<\/item>/'
echo "</channel>"
echo "</rss>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment