Skip to content
an app to download episodes of your favourite podcast to your local archive
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
testdata
.gitignore
.travis.yml
LICENSE
README.md
SOURCE.txt
build.go
feed.go
feed_test.go
go.mod
go.sum
integration_test.go
local.go
local_test.go
main.go
release.go
secrets.tar.enc
util.go
util_test.go

README.md

podsaver

an app to download episodes of your favourite podcast to your local archive

Build Status codecov Go Report Card GolangCI

Table of Contents

Why

Sometimes things go offline for good, so some of us want a local archive of a favourite podcast to re-listen to during long winter nights.

Usage

podsaver [-r] [-p path] url

The app will process the podcast feed (RSS or Atom) at a given url, scan the existing downloaded episodes in path (current directory by default) and try to download new and/or missing episodes.

How it works

podsaver scans the local directory (current working directory if -p path is not given) and tries to guess podcast episode numbers from filenames (i.e. episode14.mp3 or 14-new-guitar.avi will be detected as episode 14 of the podcast). It then fetches the podcast feed from the given url and tries to match episodes in the feed to the latest one in the local directory. If matched, podsaver will download any episodes listed in the feed that are missing locally and save them as number.ext file (ext being extension such as mp3 or avi) into the local directory. If given -r option, podsaver will also rename the existing files in a consistent manner.

For example, you have the following files:

episode3.mp3
episode 5.mp3
6.mp3
10.mp3
11-new-songs.mp3
awesomepodcast.13.mp3

and the feed has episodes 6 to 15 listed in it. podsaver will download what it can, so the folder will have:

episode3.mp3
episode 5.mp3
6.mp3
07.mp3
08.mp3
09.mp3
10.mp3
11-new-songs.mp3
12.mp3
awesomepodcast.13.mp3
14.mp3
15.mp3

podsaver has no way to get episodes 1, 2 and 4, but what was in the feed has been downloaded. Notice how the app appended trailing zeros to episodes 7, 8 and 9, because the latest episodes are in double-digit numbers.

Had you used -r option, existing files would be renamed, too:

03.mp3
05.mp3
06.mp3
07.mp3
08.mp3
09.mp3
10.mp3
11.mp3
12.mp3
13.mp3
14.mp3
15.mp3

Building the app

go run build.go

Credits

This software includes the following software or parts thereof:

You can’t perform that action at this time.