gpmdp

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 8 Imported by: 0

README

gpmdp

Go Report Card

gpmdp is a command-line utility to access the API of Google Play Music Desktop Player. It's meant to be used in macros and AppleScripts, like this one I use for pausing my music when I lock my computer:

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 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:

$ go get github.com/jimmysawczuk/gpmdp

Or, if you prefer to clone it yourself:

$ 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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL