Skip to content
rss

GitHub Action

Podcast RSS Generator

v0.1 Latest version

Podcast RSS Generator

rss

Podcast RSS Generator

Generates a podcast RSS feed from a YAML configuration

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Podcast RSS Generator

uses: vpetersson/podcast-rss-generator@v0.1

Learn more about this action in vpetersson/podcast-rss-generator

Choose a version

Podcast RSS Generator

Python Unit Tests and Linting

Description

This an RSS Feed Generator is designed to generate an RSS feed for audio/video podcasts, reading metadata and episode data from a YAML file.

It assumes that you self-host your video episodes somewhere (e.g. S3/GCS/R2) as well as the output of this script. You can then point YouTube/Spotify/Apple Podcast to this path.

This tool was written for my podcast Nerding Out with Viktor to solve for the fact that Apple's Podcast Connect require you to self-host videos in order to publish.

Features

  • Generates RSS feed for audio/video podcasts
  • Reads podcast metadata and episode data from a YAML file
  • Converts ISO format dates to RFC 2822 format
  • Attempts to follow The Podcast RSS Standard

Known Issues

  • Videos uploaded to YouTube via RSS will be uploaded as audio.
  • Spotify can't handle videos via RSS yet. You will be able to see the episodes in Podcaster, but they will not be processed and sent to Spotify properly. This is apparently a known issue that they are working on resolving.

The workaround for the above issues is to manually upload the episodes.

Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)
  • ffmpeg

Setup

  1. Clone the Repository
$ git clone https://github.com/vpetersson/podcast-rss-generator.git
$ cd podcast-rss-generator
  1. Install Dependencies
$ pip install -r requirements.txt

Optional: Install yamllint, xq and flake8.

Usage

  1. Prepare Your Data Files

Copy podcast_config.example.yaml to podcast_config.yaml and fill out your podcast metadata and eepisodes.

  1. Generate the RSS Feed

Make sure your YAML is valid:

$ yamllint podcast_config.yaml

Generate your podcast_feed.xml file:

$ python rss_generator.py

Now copy your podcast_feed.xml to S3/GCS/R2 using a tool like s3cmd, aws or mc (from Minio).

Optional: You can verify your RSS feed using a tool like Podbase.

Usage with GitHub Actions

To incorporate this action into your workflow, follow these steps:

  1. Create a Workflow File:

    • In your repository, create a new file under .github/workflows, for example, rss_workflow.yml.
  2. Set Up the Workflow:

    • Use the following configuration as a starting point:
name: Generate Podcast RSS Feed

on: [push, pull_request]

jobs:
  generate-rss:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    - name: Install yamllint
      run: pip install yamllint

    - name: Lint YAML file
      run: yamllint ${{ github.workspace }}/path/to/your/podcast_config.yaml

    - name: Run Podcast RSS Generator
      uses: vpetersson/podcast-rss-generator@master
      with:
        input_file: '/workspace/podcast_config.yaml'
        output_file: '/workspace/odcast_feed.xml'
  1. Customize Your Workflow:

    • Adjust paths to the YAML configuration and the output XML files as per your repository structure.
    • Ensure the uses field points to vpetersson/podcast-rss-generator@master (or specify a specific release tag/version instead of master).
  2. Commit and Push Your Workflow:

    • Once you commit this workflow file to your repository, the action will be triggered based on the defined events (e.g., on push or pull request).

Inputs

Note that you need /workspace is mapped to the root of your repository.

  • input_file: Path to the input YAML file. Default: podcast_config.yaml.
  • output_file: Path for the generated RSS feed XML file. Default: podcast_feed.xml.

Running Tests

To run unit tests, use:

$ python -m unittest discover tests

Contributing

Contributions to this project are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature.
  3. Commit your changes.
  4. Push to the branch.
  5. Submit a pull request.

License

MIT License