ronanboiteau / TV-Show-Randomizer

An Elixir CLI script that helps you choosing which episode from your favorite TV show you're going to watch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TV Show Randomizer (TVSR) helps you choosing which episode from your favorite TV show to watch.

Getting started

Requirements

Building TVSR

  1. Before building TVSR, you need to get its dependencies. To do so, navigate to the root of the repository from your Terminal and run this command:
mix deps.get
  1. You can then run the following command to build the tvsr executable:
mix escript.build

Using TVSR

Pass one or more .tvsr file(s) as argument(s) to the tvsr executable:

./tvsr [file1] [file2] ... [fileN]

TVSR will output a random episode between all the episodes found in the file(s) you passed as parameter(s).

Available TV Shows

TVSR interprets .tvsr files in order to select episodes.

Here is a list of the .tvsr files available in the shows/ directory:

File format

.tvsr files must follow some rules:

  • They should be named after a TV Show, with spaces replaced by hyphens (eg. How-I-Met-Your-Mother.tvsr)
  • They should contain 1 JSON-formatted episode per line. Example:
{"season": 1, "episode": 1, "title": "Pilot"}
{"season": 1, "episode": 2, "title": "Purple Giraffe"}
  • Empty lines can by used as separotors. You can use them to separate seasons inside your .tvsh files:
{"season": 1, "episode": 21, "title": "Milk"}
{"season": 1, "episode": 22, "title": "Come On"}

{"season": 2, "episode": 1, "title": "Where Were We?"}
{"season": 2, "episode": 2, "title": "The Scorpion and the Toad"}

Getting involved

Share

  • Enjoying TV Show Randomizer? Leave it a star to show your support :)
  • And share the link to this repository with your friends!

Contribute

You want to add awesome features to TV Show Randomizer? Or add a new TV Show file? Here's how:

  1. Fork TVSR
  2. Commit & push a new feature to the forked repository
  3. Open a pull request so I can merge your work in this repository :)

About

An Elixir CLI script that helps you choosing which episode from your favorite TV show you're going to watch.

License:MIT License


Languages

Language:Elixir 100.0%