1
0
Files
anime-rss/README.md
MK13 5d99b1588e Update 'README.md'
Remove calendar sample output
2022-04-21 23:48:13 +02:00

68 lines
3.7 KiB
Markdown

# anime-rss
Download anime via RSS and Transmission
Repository avater is Umaru Doma from [Himouto! Umaru-chan](https://myanimelist.net/anime/28825/Himouto_Umaru-chan)
## Prerequisites
[Transmission](https://transmissionbt.com/) needs to be installed, running, configured and accessible from the host
running `anime-rss`. Further `transmission-remote` needs to be on the path.
In the Transmission config file `~/.config/transmission-daemon/settings.json` check the `rpc-` properties, as
`anime-rss` uses `transmission-remote` which sends the torrent URLs to Transmission via RPC.
Also requires at least Python `3.10`.
## Install
###### Install dependencies
`pip install feedparser notify-py rich`
###### Clone repo
`git clone ...`
###### Install systemd service and timer (optional)
`anime-rss` comes with a systemd user unit and timer. To install those, execute the `install-systemd-unit.sh` script.
It will copy the unit and timer to `~/.config/systemd/user/`
## Config
###### Adjust `config.json`
* `animeDownloadDir` - base path where downloaded anime should be stored. *Without trailing slash*.
Passed as download directory to transmission (`-w`)
* `dirPerAnime` - whether to create one directory per anime. Created automatically as sub folder of `animeDownloadDir`
by replacing spaces in the anime name with underscores (`true`/`false`)
* `notifications` - whether to send a notification, e.g. if transmission is not running or a new episode was added
(`true`/`false`)
###### Adjust `animes.json`
* Add a Feed - it has to have an `ID` that's used in output. Freetext
* Add the RSS URL to the feed, e.g. `https://subsplease.org/rss/?t&r=1080` for the RSS feed of the 1080p releases of the
`SubsPlease` group
* Add an anime - `Title` should be the same as in the feed content
* `Local` is the starting episode number, e.g. `00` for brand new series, or `25` for e.g the second season of an anime
that continues with the numbering, where the first season had 24 episodes. Left padded with zeros to at least two digits
* Add the weekday the anime airs via the `Airing` element. Setting this to `Done` will check the feed URL content in
reverse order, which is handy if a feed contains all episodes of a finished anime
* Provide an `Episode-Regex` to parse the episode number from the title of an RSS entry. As this regex is used for all
elements of a feed it should match all those. Use the `$SHOWS$` placeholder in the regex for substitution with the
actual anime name during feed parsing.
## Running and example output
```
[MK13@brutebox ~]$ python path/to/anime-rss.py -c path/to/config.json -a path/to/animes.json
Checking feed: SubsPlease
Checking anime: Go-toubun no Hanayome S2 - Airing every Thursday 02/x
Checking anime: Jaku-Chara Tomozaki-kun - Airing every Friday 02/x
Checking anime: Mushoku Tensei - Airing every Sunday 01/x
NEW NEW NEW Mushoku Tensei 02
localhost:9091/transmission/rpc/ responded: "success"
Checking anime: Ore dake Haireru Kakushi Dungeon - Airing every Friday 02/x
Checking anime: Tensei Shitara Slime Datta Ken - Airing every Tuesday 25/x
Checking anime: Wonder Egg Priority - Airing every Tuesday 01/x
Checking feed: Nyaa Kaifuku Jutsushi no Yarinaoshi
Checking anime: Kaifuku Jutsushi no Yarinaoshi - Airing every Wednesday 01/x
Checking feed: Nyaa Shingeki no Kyojin
Checking anime: Shingeki no Kyojin - Airing every Sunday 64/x
NEW NEW NEW Shingeki no Kyojin 65
localhost:9091/transmission/rpc/ responded: "success"
```
Both parameters are optional, if not given they are searched in the current working directory.
`anime-rss` also outputs colored and formatted text via ANSI escape sequences if supported.
### Calendar view
If given the `-t` flag `anime-rss` will output a calendar view of all configured animes.