Closed jpoehls closed 8 years ago
Hey @jpoehls - thanks for your comment! This is a nice proposal, so I have linked to this issue from a thread in our community forum where we are aggregating ideas/requests for Caddy plugins.
If you want to continue discussing the plugin before development begins on it, feel free to start a new topic on the forum. :+1: Hope to see you participate with us there!
This is a proposal for a new add-on. I don't have time to work on it myself right now but would like to get the spec flushed out and help in any other way I can.
Read, comment, let's get all the details ironed out so it is easy for someone to pick up and implement!
Use case
Generates RSS and Atom podcast feeds from a directory of audio files.
Caddy uses metadata from the audio files themselves for the episode information, or lets you provide more detailed metadata as desired.
Caddy handles generating the various podcast feed formats and ensuring compliance with fancy features of iTunes and such.
Caddy config
basepath is the base path to match. Podcast will not activate if the request URL is not prefixed with this path. Podcast will match the following specific paths under the base path to serve the feeds from:
E.g., if basepath is /podcast then the RSS feed will be at /podcast/rss.xml
Caddy/1.7.1
. Used as/atom10:feed/atom10:generator
and/rss/channel/generator
./atom10:feed/atom10:author
,/rss/channel/dc:creator
, and/rss/channel/itunes:author
/atom10:feed/atom10:contributor
and/rss/channel/dc:contributor
./rss/channel/dc:publisher
and/rss/channel/itunes:owner
.Simple directory structure example
Caddy would serve a podcast feed at
/PilgrimsProgress/rss.xml
with the three chapters each as episodes.Episode generation
Each MP3 in the specified directory is included in the podcast feed as an episode. Metadata is extracted from the ID3 tags of the MP3 to provide information about the episode. Alternatively, you can provide a companion metadata file for each episode which will be used instead of the ID3 data.
https://github.com/dhowden/tag is used to extract the ID3 tags.
Here is the podcast feed metadata for episodes and how it is determined.
Episode ordering
Order of episodes in the feed will be alphabetical based on the episode filenames.
Audio files
You can provide multiple formats for your audio by naming the files the same with different file extensions.
If you have the following file structure:
Then only one episode will be generated and will include both MP3 and OGG as audio formats.
We will try to extract ID3 data from the files in alphabetical order.
Side car metadata files
You can provide explicit metadata for each episode in side car file like so.
Example file format:
Serving audio files from S3, etc.
You can also serve your audio files from S3 or any other non-Caddy location by simply providing the sidecar metadata files and specifying enclosure.
Example:
episode_01.yaml
TODO: Specify how multiple enclosures should be specified, their file sizes, media type, etc.
TODO: In addition to a file per episode's metadata, should we also allow all episode metadata to be in a single file that we read? Something like index.json?
Podcast guidelines: https://github.com/gpodder/podcast-feed-best-practice/blob/master/podcast-feed-best-practice.md