= NowPlaying bot
A "nowplaying" bot that can draw from multiple sources and send to multiple destinations
== Sources
Currently, the implemented sources are:
== Sinks
Currently, the implemented sinks are:
== Running
To run, you will need to supply a few things. You'll need a YouTube Data API key, so go to the google developer
console and get one of those. It can be provided to the program through the YOUTUBE_KEY
environment variable.
In order to use one of the sources, you'll also need to supply some information about it. For the last.fm
source, get a last.fm API key and assign it to the LASTFM_API_KEY
environment variable, along with your
last.fm username in the LASTFM_USERNAME
environment variable. The SoundTouch source only needs the
hostname of your SoundTouch speaker, in the SOUNDTOUCH_HOST
environment variable.
Environment variables can be set on the command line, or in a .env
file.
When the program starts, it will attempt to find a mastodon access token in the creds.json
file. If the
file doesn't exist, the program will prompt you on what to do to give it access to post to your mastodon
account.
== Adding a new source
Adding a new source is not too hard, this commit shows a good example:
https://gitlab.com/pwoolcoc/npbot/commit/4eddf89266c71677511e2cba86a69c8fe60db3ec
Basically the steps are:
src/source
moduleSource
trait..from_env(cli_args: Opt) -> Self
static method to your data structure if you want to use
the detect_and_register!
macro in src/main.rs
.src/main.rs
, add any necessary cli arguments, and under the // Sources
line in main
,
add the necessary code to detect and register the new source== TODO