Metadata-Version: 2.1
Name: generss
Version: 0.3.1
Summary: Generate RSS feeds from media files in a directory
License: MIT License
Keywords: RSS,podcast
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Communications :: File Sharing
Classifier: Topic :: Utilities
Requires-Python: >=3.4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mutagen (==1.47.0)
Requires-Dist: eyed3 (==0.9.7)

# 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
