JARVIS: Streamer's Butler
A digital assistant comprised of features from a streamer's wishlist
Project depreciated for JARVIS.NET
This couldn't of been made without all of the awesome developers out there making their work availble to the public.
- Simple Notification Log
- Output Data Files
- Spotify latest song w/ truncation
- Spotify latest album cover image
- Spotify latest URL
- Twitch latest follower
- Twitch latest followers
- Twitch channel views
- Twitch channel display name
- Twitch current game
- Twitch current viewer count
- Working on text
- Coffee count
- Crash count
- Saves count
- ... easy to add more counters ...
- Configurable Overlay (For Browser Sources)
- Accessible local data endpoints
- Also lets you host any page!
- < 15 MB memory footprint - It's 10.4 MB on our test systems!
While not always the latest and greatest, occasionally we will update the "easy mode".
Make sure to edit the jarvis.json configuration file!
Compile From Source
Make sure you install the necessary libraries for JARVIS to do his thing.
go get github.com/zmb3/spotify go get github.com/chosenken/twitch2go go get github.com/andygrunwald/go-jira go get github.com/fatih/color go get github.com/atotto/clipboard go get github.com/akavel/rsrc go get github.com/skratchdot/open-golang/open go get github.com/getlantern/filepersist go get github.com/thoj/go-ircevent go get github.com/getlantern/systray go get github.com/matryer/resync go get github.com/bwmarrin/discordgo go get github.com/jpillora/backoff go get google.golang.org/api/youtube/v3 go get golang.org/x/oauth2/google
Depending on your platform you may need to adjust the build scripts, they work on macOS and Linux varieties. We just haven't made the windows equivalents.
It's important that GO's 'bin' is in your path (on macOS/Linux) for the build scripts to work. A default GO install often does not include it, so you must manually go back and add it.
The only arguement used during execution of JARVIS is a path to the configuration JSON file, if that argument is not present, JARVIS assumes it is in the launch directory.
This is a work in progress, there are a lot more options in the file, you simply need to go looking
||The absolute path to where the outputted data files should be placed||string||
||The prefix applied to messages sent to Discord with general purpose, also tied to icons which appear in the log channel.||string||
||How often should Spotify be polled for new information on what's playing/happening. Current recommendation is to keep this at every 5 seconds.||string||
||Same idea as the
||The character length at which the combined artist and track name will be truncated||integer||
||The characters to append when truncating with the
||How often should Twitch be polled for new information. Current recommendation is to keep this at every 10 seconds.||string||
||Same idea as the
||This is the numerical identifier of your channel, it isn't so simple to get off hand. Check the section below on one way to get it.||integer||
||The number of followers to store in the previously followed list. Twitch typically returns 25 records (even if you request less) and caps it at 100 entirely.||integer||
Get Your Twitch Channel ID
Hop on over to terminal and fill this command out, and it will return some JSON with your "ChannelID" listed in it.
curl -H 'Accept: application/vnd.twitchtv.v5+json' -H 'Client-ID: <CLIENT ID>' -X GET https://api.twitch.tv/kraken/users?login=<USERNAME>
Once you have managed to wrangle GO into compiling the source, you simply need to run the executable. The app will spawn browser tabs to process the OAuth2 login through.You will need to do this every time the app stars, thus, it has been automated as best as can be.
Notice the tray icon, it has a menu.
As of 0.1.1, the "Overlay" feature is experimental, but in theory you can create many things with it. In tools like OBS, you would add a browser source and set it to
http://localhost:8080/overlay and it will serve the content there.
There is also a neat little feature where you can server other html files in the www folder, http://localhost:8080/page/?spotify-image.html for example will serve a browser source version of the spotify image that refreshes every 5 seconds.
While JARVIS is running, there are numerous endpoints available for extraction data (these are only a few of them), outside of the file repository:
|http://localhost:8080/spotify/track||The current track text from Spotify|
|http://localhost:8080/spotify/image||The raw image data from Spotify|
|http://localhost:8080/twitch/follower/last||The last person to follow you on Twitch|
|http://localhost:8080/twitch/viewers/current||The number of people watching the Twitch stream|
|http://localhost:8080/stats/workingon||Your last set Working On text|
|http://localhost:8080/stats/coffee||Your current coffee count|
Drop them in the Issues section, and mark them as an enhancement (label). Please understand that this is just a side project, resulting from not liking what was currently available.