Skip to content

Instantly share code, notes, and snippets.

@neonichu
Created March 31, 2012 17:29
Show Gist options
  • Save neonichu/2266940 to your computer and use it in GitHub Desktop.
Save neonichu/2266940 to your computer and use it in GitHub Desktop.
Export OPML from PocketCasts
#!/bin/sh
##
## Generate OPML from your PocketCasts podcast list
##
## You need to retrieve the 'Podcastdb.sqlite' file using iExplorer
## or some similar utility
##
cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<body>
EOF
sqlite3 $HOME/Desktop/Podcastdb.sqlite .dump 2>/dev/null|sed 's/,/\
/g'|cut -d\' -f2|grep '^http:'| \
grep -v 'gif$\|jpg$\|png$\|assets\.5by5\.tv\|mp3$\|m4a$\|cr176\.html'| \
sed -e 's/^/<outline type="rss" htmlUrl="/' -e 's/$/"\/>/'
cat <<EOF
</body>
</opml>
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment