Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimmysawczuk/gpmdp
Command line API client for Google Play Music Desktop Player
https://github.com/jimmysawczuk/gpmdp
Last synced: about 2 months ago
JSON representation
Command line API client for Google Play Music Desktop Player
- Host: GitHub
- URL: https://github.com/jimmysawczuk/gpmdp
- Owner: jimmysawczuk
- License: mit
- Created: 2017-11-09T22:05:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-04T22:21:34.000Z (over 6 years ago)
- Last Synced: 2024-06-20T10:14:40.851Z (7 months ago)
- Language: Go
- Size: 61.5 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpmdp
[![Go Report Card](https://goreportcard.com/badge/github.com/jimmysawczuk/gpmdp)](https://goreportcard.com/report/github.com/jimmysawczuk/gpmdp)
**gpmdp** is a command-line utility to access the API of [Google Play Music Desktop Player](https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-). It's meant to be used in macros and AppleScripts, like this one I use for pausing my music when I lock my computer:
```applescript
tell application "Google Play Music Desktop Player"
if it is running then
do shell script "GPMDP_AUTH_KEY=my-auth-key gpmdp pause"
end if
end tell
```## Installing a premade binary
Download the [relevant pre-compiled binary](https://github.com/jimmysawczuk/gpmdp/releases) for your system and copy it to a directory in your `$PATH`.
## Installing from source
You can install `gpmdp` using `go get` or by cloning it yourself. Via `go get`:
```bash
$ go get github.com/jimmysawczuk/gpmdp
```Or, if you prefer to clone it yourself:
```bash
$ git clone https://github.com/jimmysawczuk/gpmdp.git $GOPATH/src/github.com/jimmysawczuk/gpmdp
$ cd $GOPATH/src/github.com/jimmysawczuk/gpmdp
$ go install
```You may need to add this directory to your `$PATH`, or copy the binary into a standard location.
## Usage
Start up Google Play Music Desktop Player, and run:
```
$ gpmdp auth
```Enter the PIN as prompted, then copy the provided authentication key. It's used as an environment variable by gpmdp, so you can either store this in your `.bashrc`/`.zshrc` or prefix any commands you want to run with it, i.e. `GPMDP_AUTH_KEY=my-auth-key gpmdp pause`.
Finally, you can run `gpmdp play`, `gpmdp pause`, `gpmdp toggleshuffle` or `gpmdp status`, all of which should be self explanatory. Running `gpmdp help` shows a usage screen.