UP | HOME

pypodcaster - mp3s to Podcast XML Feed

pypodcaster is a command line utility that generates podcast feeds from a directory of mp3 files. It reads ID3 tags and translates them into XML entries.

Any standard html server (e.g. Apache, nginx, etc.) can be used to host the podcast.

Installation

Install from PyPI using pip

The simplest way to install pypodcaster is via pip install from the Python Package Index

pip install pypodcaster

From Source

Alternatively clone the source code and install with setup.py

git clone git://mantlepro.com/pypodcaster.git
cd pypodcaster
sudo python setup.py install

If you do not have git installed, download the zip

unzip pypodcaster.zip
cd pypodcaster
sudo python setup.py install

Setup

Create a directory to hold podcast media

mkdir podcast

Enter channel information into channel.yml

Note: title, link, description, owner, and podcast_url are required fields. The rest are optional but recommended.

title: 'Podcast Title'
link: 'http://link-to-website-corresponding-to-the-channel.com'
description: 'Phrase or sentence describing the channel.'
language: 'en-us'
copyright: 'Copyright notice for channel content.'
subtitle: 'Podcast Subtitle'
podcast_url: 'https://dl.dropboxusercontent.com/u/12345678/podcast/'
image: 'cover.jpg' # full url or image under podcast_url
author: 'Author name or Company'
owner:
  name: 'John Doe'
  email: 'john@doe.com'
categories: ['Education', 'How To']
explicit: No
keywords: [comma, separated, list]

For a list of categories see Apple's Podcasts Connect Help page.

cd to directory containing podcast media and run

pypodcaster -o podcast.xml

pypodcaster will create podcast.xml with settings from channel.yml. Run the command every time you wish to update the podcast feed.

To see everything pypodcaster is capable of, run pypodcaster --help

usage: pypodcaster [-h] [-c /path/to/channel.yml] [-o OUTPUT] [-V]
                   [sources [sources ...]]

pypodcaster: generate podcast xml feed from a directory of media files.
Copyright (C) 2015-2017 Josh Wheeler. This program comes with ABSOLUTELY NO
WARRANTY. This is free software, and you are welcome to redistribute it under
certain conditions. For details, visit
https://gitlab.com/mantlepro/pypodcaster

positional arguments:
  sources               Specify source files or directories

optional arguments:
  -h, --help            show this help message and exit
  -c /path/to/channel.yml, --channel /path/to/channel.yml
                        Specify channel definition instead of current
                        directory's channel.yml
  -o OUTPUT, --output OUTPUT
                        Direct output to FILE instead of stdout
  -V, --version         show program's version number and exit

example: pypodcaster -o index.xml

Advanced

Sort by Date

By default, the podcast feed is sorted by file modification time. If you wish to modify the date of a podcast episode, prepend the date to the episode's filename in the following format: YYYY-MM-DD or YYYYMMDD.

2016-03-17_episode_title.mp3
20160317_episode_title.mp3

Episodic Images

To add an image to the episode or series, add a jpg with the same filename, title or album tag alongside the mp3 file.

If album name is used, the image will carry across an entire series. If no jpg is provided, the cover image will default to the channel's cover image set in channel.yml.

Contents of /var/www/html/podcast:
  first_podcast.mp3
  first_podcast.jpg
  series01.mp3
  series02.mp3
  series03.mp3
  series_name.jpg # "Series Name" from album tag

Customize XML Template

pypodcaster uses Jinja2 for xml templating. If you wish to edit the feed's format beyond pypodcaster's basic template, add template.xml to your podcast directory with contents based on template.xml

Podcast Specifications