Git Product home page Git Product logo

gpmdp's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.