A command line tool to display the song currently playing on Spotify in Typetalk status.
We want to share the track we are listening to at work in a discreet and easy way. If we post to a topic in Typetalk, we have to open that topic and that post is noise. If it's a status, we can just hover over any topic, and it's not noise.
- Install the nowplaying-on-typetalk.
- Register Typetalk App and get Client ID and Client Secret.
- Create Spotify App and set the URL to redirect to after authentication, get Client ID and Client Secret.
- Write a config file.
- Execute the nowplaying-on-typetalk command.
- When you execute this command, your browser will launch.
- You can see Spotify's authentication screen in your browser.
- Authenticate with your Spotify account.
You can easily install it by making a curl request to gobinaries.com. You don't have to install Go.
$ curl -sf https://gobinaries.com/typetalk-gadget/nowplaying-on-typetalk | sh
It can be installed with Homebrew, the package manager for MacOS.
$ brew tap typetalk-gadget/nowplaying-on-typetalk
$ brew install nowplaying-on-typetalk
If you have the Go(go1.14+) installed, you can also install it with go get command.
$ go get github.com/typetalk-gadget/nowplaying-on-typetalk
If the installation fails, set the environment variable GO111MODULE
to on
by the following command.
# Bash
$ export GO111MODULE=on
# Windows Command Prompt
> set GO111MODULE=on
Built binaries are available on Github releases:
https://github.com/typetalk-gadget/nowplaying-on-typetalk/releases
$ nowplaying-on-typetalk [flags]
-c, --config string config file path (default "~/.nowplaying-on-typetalk/config.yml". if you set $XDG_CONFIG_HOME, switch default to "$XDG_CONFIG_HOME/nowplaying-on-typetalk/config.yml")
--debug debug mode
-h, --help help for nowplaying-on-typetalk
--port int port number for OAuth (default 18080)
--spotify_client_id string spotify client id [SPOTIFY_CLIENT_ID]
--spotify_client_secret string spotify client secret [SPOTIFY_CLIENT_SECRET]
--status_emoji string typetalk status emoji [STATUS_EMOJI] (default ":musical_note:")
--topic strings topic ID to post
--typetalk_client_id string typetalk client id [TYPETALK_CLIENT_ID]
--typetalk_client_secret string typetalk client secret [TYPETALK_CLIENT_SECRET]
--typetalk_space_key string typetalk space key [TYPETALK_SPACE_KEY]
-v, --version version for nowplaying-on-typetalk
Default par is ~/.nowplaying-on-typetalk/config.yml
.
Default config file extension can be either .yml
or .yaml
.
If you set $XDG_CONFIG_HOME
, switch default to $XDG_CONFIG_HOME/nowplaying-on-typetalk/config.yml
.
debug: true
port: 18080
typetalk_client_id: deadbeef
typetalk_client_secret: deadcode
typetalk_space_key: foo
spotify_client_id: deadbeef
spotify_client_secret: deadcode
status_emoji: ":musical_note:"
topics:
- 12345
This tool uses Typetalk's API to save the currently status. So you need to create a Typetalk App and get Client ID and Client Secret.
This section explains how to setting Typetalk App.
- Login to Typetalk and open develop setting from following URL.
- Once you have successfully logged in, your develop setting will open.
- Click "Register new application" and register a new Typetalk App.
- Fill in the "Application Name" and "Grant Type" and "Description" fields on the APP register form.
- Application Name: nowplaying-on-typetalk
- Grant Type: Client Credentials
- Description: Synchronizing the currently playing to Typetalk status
- Click the "Register" and open the App management screen.
- You can see the "Client ID" and "Client Secret" of this app.
This tool uses Spotify's API to get the currently playing song. So you need to create a Spotify App and get Client ID and Client Secret. You also need to set up a URL to be redirected to after authentication.
This section explains how to setting Spotify App.
- The following URL will open the login screen to Spotify's dash-board.
- Click "LOG IN" and login with your account.
- Once you have successfully logged in, your dashboard will open.
- Click "CREATE NEW APP" and create a new Spotify App.
- Fill in the "App name" and "App description" fields on the APP creation form.
- App name: nowplaying-on-typetalk
- App description: Synchronizing the currently playing to Typetalk status
- Check the checkbox to agree to the terms.
- Click the "CREATE" and open the App management screen.
- The following shows the App administration screen.
- Click the "EDIT SETTING" and open the App Settings Editor screen.
- Set the following URL in "Redirect URI's" as the URL to be redirected to after authentication.
- http://localhost:18080/nowplaying-on-typetalk (* The port number should be as same as your config. )
- Click the "ADD" and Click the "SAVE" and save the setting.
- You can check the "Client ID" and "Client Secret" on the administration screen of the app.
- Click the "SHOW CLIENT SECRET" and display the "Client Secret".
For bugs, questions and discussions please use the GitHub Issues.