Want to automatically get curated animes as push notifications ? Keep reading :) Curated animes ? By who ? By the whole MAL community but given ur standards !
MyAnimeList Radar is a small daemon/bot which will monitor MyAnimeList once a day. It will maintain a state of planned/on going animes and once one is finished airing, it will process it in order to determine if you should be notified or not.
- Because I like to binge watch and this was one of the main original reasons to create this bot :3
- Secondly (and more importantly) because it give the community the time to rate them. The more you wait, the more reviews are used to fine grain the final score and better the animes are curated before processing
- First of all the score: you setup a minimal score a finished anime must have to not be ruled out by the bot
- Then you can setup several types of blacklists:
- Genres blacklist (
Music
,Kids
, etc...) - Types blacklist (
Special
,Movie
, etc...)
- Genres blacklist (
- Finally (this is optionnal) if you have a MAL account, you can specify your username: before each batch of notifications, your profile will be scanned. If an anime about to be notified is present on your list (no matter its status) it won't be notified (because you obviously already know about this one)
In order to deliver the notifications, an external service is used: pushover. It allows rich push notifications to be carried to your devices (Android, iOS or even desktop browser). You will need to create an account and an application (more on this a bit later). Keep in mind that while this bot is free, pushover is not. You will need to perform a $5 USD one-time purchase for each platform you want to use after the 7 days trial.
While I understand this could be prohibitive for some, I can assure you this is $5 dollars very well spent: pushover is highly customizable and because you can use your pushover account for a wide variety of apps and even on your own scripts (the API is very simple) it makes pushover a really nice notifications center for all your projects.
Just to give you an idea, here is 2 (long) screenshots of malradar on pushover, one being the notifications list of the malradar, the other a single notification in open for details:
Still interested ? Let's dive in.
- First go to pushover
- Create your account
- Write down your
User Key
- Then create an application
- Name: Whatever you like, for exemple on my side:
Animes releases
- Description: again this is just for you to remember what this app is about :) (for the lazy ones:
MyAnimeList Radar bot
) - URL: you can setup
https://github.com/hekmon/malradar
;) - Icon: feel free to choose your own, if you have no idea I recommend this one (hi-res available here) as having no icon is just sad.
- Once registered, write down the application
API Token
- Name: Whatever you like, for exemple on my side:
- Download the pushover app on your phone and log in
- MALRadar is prepackaged for Debian-like OSes (this means Ubuntu as well). Simply download the deb package here and install it.
- Edit the configuration file located at
/etc/malradar/config.json
(more details on the next section) - Start the daemon with
systemctl start malradar.service
- Follow the progress with
journalctl -f -u malradar.service
and relax while the inital list is building up as it can be quite long because of the rate limiting (~30m for 4 seasons). You will have the init notifs at the end of the process if thenotify_on_first_run
value istrue
.
See the docker page.
- Setup a working Golang environment
- Build MALRadar (
go build
) - Take inspiration from the
debian
folder for anything from configuration files to systemd service unit file.
By using the following configuration example:
{
"myanimelist": {
"minimum_score": 7.5,
"user_to_check_against": "",
"blacklists": {
"genres": [
"Hentai",
"Kids",
"Music",
"Shoujo Ai",
"Shounen Ai",
"Sports",
"Yaoi",
"Yuri"
],
"types": [
"Special"
]
},
"initialization": {
"nb_of_seasons_to_scrape": 4,
"notify_on_first_run": true
}
},
"pushover": {
"user_key": "<yourshere>",
"application_key": "<yourshere>"
}
}
myanimelist
minimum_score
: any anime processed must have at least this score to not be eliminated during the pre notification processuser_to_check_against
: your MAL user. If not empty it will be used to discard any animes already in your list and not in the "Plan to Watch" state. Particularly usefull for the first run when you have specified a big number of seasons to scan (nb_of_seasons_to_scrape
) and have not deactivate the initial scan notifications (notify_on_first_run
).blacklists
genres
: if a candidate anime has one or several of these genres, it will be discarded. MALRadar will maintain a list of encountered genres at/var/lib/malradar/encountered_genres.json
or you can find them here.types
: if a candidate anime has its type within this list, it will be discarded. MALRadar will maintain a list of encountered types at/var/lib/malradar/encountered_types.json
.
initialization
: allow to configure the behavior of MALRadar during first scannb_of_seasons_to_scrape
: MALRadar will always start its initial scan for the current season (understand season as 'Summer 2020'). Then it will continue backwards until this number of seasons scanned is reached. High numbers will increase the initial scan duration.notify_on_first_run
: MALRadar collects already finished animes during the initial scan too. With this parameter you will be notified of all finished animes which pass your processing rules that have aired during the time span configured bynb_of_seasons_to_scrape
. Usage of the complementaryuser_to_check_against
is highly recommended to avoid a notifications flood on the first scan of animes you already know.
pushover
user_key
: the user key you written down earlierapplication_key
: the application API key you written down earlier
MALRadar keeps an internal state to detect animes airing status changes. This state is located at /var/lib/malradar/animes_state.json
but is only maintained in memory during run. It is saved to disk at stop and loaded from disk at start. But if you want to backup the state without having to stop/backup/start you can issue a systemctl reload malradar.service
which will safely dump the current in memory state to disk without stopping the bot.
This project would not have been possible without the unofficial MyAnimeList API jikan and the its golang bindings by darenliang. If you like MALRadar, consider supporting the project.