Skip to main content

Generate RSS feeds from media files in a directory

Project description

genRSS

genRSS is a tool to create an RSS 2.0 feed from media files in a directory. Files can be looked for recursively in subdirectories and can be restricted to a given set of extensions.

Installation

Another package named genrss already exists on pypi, we use generss (with an e after the n) for installation:

pip install generss

Once installed, you can use genRSS on the command line.

Determining file duration

To include media file duration in your feeds (using the <itunes:duration> tag), genRSS use tries the following options.

  • mutagen: a python package installed alongside genRSS that can deal with audio and video files.
  • sox: can only handle audio files, runs faster than ffprobe.
  • ffprobe: normally installed with ffmpeg, can deal with audio and video files but it is the slowest of the three options.

In any case, if genRSS fails to get media file duration with one tool, it'll fall back to the next one. If none of these tools is installed or if file duration cannot be obtained, no <itunes:duration> tag will be inserted.

Usage options

Type genRSS -h to show the usage options:

  -d DIRECTORY, --dirname DIRECTORY
                        Directory to look for media files in.
                        This directory name will be appended to the host name
                        to create absolute paths to your media files.
  -r, --recursive       Look for media files recursively in subdirectories
                        [Default:False]
  -e STRING, --extensions STRING
                        A comma separated list of extensions (e.g. mp3,mp4,avi,ogg)
                        [Default: all files]
  -o FILE, --out FILE   Output RSS file [default: stdout]
  -H URL, --host URL    Host name (or IP address), possibly with a protocol
                        (default: http) a port number and the path to the base
                        directory where your media directory is located.
                        Examples of host names:
                         - http://localhost:8080 [default]
                         - mywebsite.com/media/JapaneseLessons
                         - mywebsite
                         - 192.168.1.12:8080
                         - http://192.168.1.12/media/JapaneseLessons
  -i URL, --image URL   Absolute or relative URL for feed's image [default: None]
  -M, --metadata        Use media files' metadata to extract item title [default: False]
  -t STRING, --title STRING
                        Title of the podcast [Default: use directory name as title]
  -p STRING, --description STRING
                        Description of the podcast [Default:None]
  -C, --sort-creation   Sort files by date of creation instead of name (default)
  -v, --verbose         set verbose [default: False]

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

generss-0.3.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

generss-0.3.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file generss-0.3.1.tar.gz.

File metadata

  • Download URL: generss-0.3.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for generss-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1fc2ff7918d81e57cd82186ef27d545709f29c2c4d722b500d99893056991ee1
MD5 4c2a247647f137cdddabb508e0fbef04
BLAKE2b-256 9f366bb762e20932b46c6baaf0a70e693ed90fc9f71ef0a29841b08d6f526fd4

See more details on using hashes here.

File details

Details for the file generss-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: generss-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for generss-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c98da5d9c52c76d581903025c88f7fa8bdfb3621ba578d00d6d5c35632e63e3
MD5 576b8a1440c4723563608ad51a882503
BLAKE2b-256 950c2b8dae8deb0a0b43939a5cbcdb6d4180138dfa9e48d0ce8608a14fd2ffae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page