Package: overcast-to-sqlite
overcast-to-sqliteSave listening history and feed/episode info from Overcast to a SQLite database. Try exploring your podcast listening habits withDatasette!How to installAuthenticationFetching and saving updatesExtending and saving full feedsDownloading transcriptsHow to install$ pip install overcast-to-sqliteOr to upgrade:$ pip install --upgrade overcast-to-sqliteAuthenticationRun this command to login to Overcast (note: neither your password nor email are saved, only the auth cookie):$ overcast-to-sqlite authThis will create a file calledauth.jsonin your current directory containing the required value. To save the file at a different path or filename, use the--auth=myauth.jsonoption.If you do not wish to save this information you can manually download the "All data" filefrom the Overcast account pageand pass it into the save command as described below.Fetching and saving updatesThesavecommand retrieves all Overcast info and stores playlists, podcast feeds, and episodes in their respective tables with a primary keyovercastId.$ overcast-to-sqlite saveBy default, this saves toovercast.dbbut this can be manually set.$ overcast-to-sqlite save someother.dbBy default, it will attempt to use the info inauth.jsonfile is present it will use the cookie from that file. You can point to a different location using-a:$ overcast-to-sqlite save -a /path/to/auth.jsonAlternately, you can skip authentication by passing in an OPML file you downloaded from Overcast:$ overcast-to-sqlite save --load /path/to/overcast.opmlBy default, the save command will save any OPML file it downloads adjacent to the database file inarchive/overcast/. You can disable this behavior with--no-archiveor-na.For increased reporting verbosity, use the-vflag.Extending and saving full feedsTheextendcommand that will download the XML files for all feeds you are subscribed to and extract tags and attributes. These are stored in separate tablesfeeds_extendedandepisodes_extendedwith primary keysxmlUrlandenclosureUrlrespectively. (See points 4 and 5 below for more information.)$ overcast-to-sqlite extendLike the save command, this will attempt to archive feeds toarchive/feeds/by default. This can be disabled with--no-archiveor-na.It also supports the-vflag to print additional information.There are a few caveats for this functionality:The first time this is invoked will require downloading and parsing an XML file for each feed you are subscribed to. (Subsequent invocations only require  this for new episodes loaded bysave) Because this command may take a long time to run if you have many feeds, it is recommended to use the-vflag to observe progress.This will increase the size of your database by approximately 2 MB per feed, so may result in a large file if you subscribe to many feeds.Certain feeds may not load due to e.g. authentication, rate limiting, or other issues. These will be logged to the console and the feed will be skipped. Likewise, an episode may appear in your episodes table but not in the extended information if it is no longer available.The_extendedtables use URLs as their primary key. This may potentially lead to unjoinable / orphaned episodes if the enclosure URL (i.e. URL of the audio file) has changed since Overcast stored it.There is no guarantee of which columns will be present in these tables aside from URL, title, and description. This command attempts to capture and normalize all XML tags contained in the feed so it is likely that many columns will be created and only a few rows will have values for uncommon tags/attributes.Any suggestions for improving on these caveats are welcome, pleaseopen an issue!Downloading transcriptsThetranscriptscommand that will download the transcripts if available.Thesaveandextendcommands MUST be run prior to this.Episodes with a "podcast:transcript:url" value will be downloaded from that URL and the download's location will then be stored in "transcriptDownloadPath".$ overcast-to-sqlite transcriptsLike previous commands, by default this will save transcripts toarchive/transcripts/<feed title>/<episode title>by default.A different path can be set with the-p/--pathflag.It also supports the-vflag to print additional information.There is also a-sflag to only download transcripts for starred episodes.