Install the requisite package(s)
python3 -m pip install --upgrade [--user] -r requirements.txt
Obtain epgen.py
git clone the/URL/of/this/repository.git
cd epgen
$ python3 epgen.py game of thrones
:: Season 4 Episode 10 of Game of Thrones : 'The Children'
$ python3 epgen.py name_of_show [-s SEASONS] [-e EPISODES] [-h] [-i] [-d] [-u]
name_of_show
(required): the approximate name of show to look up in the database.- example:
python3 epgen.py name_of_show
- example:
-s
,--seasons
SEASONS
(optional): a whitespace-separated list of season numbers to randomly choose from- example:
python3 epgen.py [...] -s 4 8 9
- example:
-e
,--episodes
EPISODES
(optional): a whitespace-separated list of integers representing particular episode numbers to randomly choose from- example:
python3 epgen.py game of thrones -e 9 10
- example:
-h
,--help
(optional): show a usage help message-i
,--include-extras
(optional): whether to include a season 0 in the random selection, i.e., most commonly, the season of bloopers or extras footage-d
,--description
(optional): display a brief summary of the episode that was chosen-u
,--unweighted-choice
(optional): randomizes season irrespective of how many episodes each season has
Examples of usage:
$ python3 epgen.py the office us
:: Season 8 Episode 2 of The Office (US) : 'The Incentive'
$ python3 epgen.py the good place -s 1 2 -e 2 3 4
:: Season 1 Episode 2 of The Good Place : 'Flying'
$ python3 epgen.py the office us -i
:: Season 0 Episode 14 of The Office (US) : 'The Office Retrospective'
$ python3 epgen.py sacred games --desc
:: Season 1 Episode 2 of Sacred Games : 'Halahala'
:: News of Ganesh Gaitonde creates a stir among Mumbai's VIPs, from politicians to film stars. Removed from the case, Sartaj begins his own investigation.
$ python3 epgen.py game of thrones -e 9
:: Season 6 Episode 9 of Game of Thrones : 'Battle of the Bastards'
- Upload to PyPI to allow
pip
installation - Create web interface
- Support to install script in system path so you can call
epgen
from anywhere - [moonshot] Exclude episodes with major plot points
- [moonshot] Add support for optional
cowsay
output - Pass list of seasons as argument to select episodes from
- Weigh random choice by the number of episodes in each season
- Allow option to unweigh
- [may not be fixed] seems to not work over VPN (something goes wrong on tvdb_api's end, not ours)