Interact with the currently running music player. Supports iTunes Mac, iTunes Windows, Spotify Mac, Rdio Mac, MPD, Rhythmbox, Amarok and XMMS2.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
test
.envrc
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
anyplayer.gemspec

README.md

Anyplayer

Gem Version Build Status

Interacts with the currently running music player. Supports iTunes Mac, iTunes Windows, Spotify Mac, Rdio Mac, MPD, Rhythmbox, Amarok and XMMS2.

Install

$ gem install anyplayer

Use it in your terminal

$ anyplayer artist     # artist of the current track
New Order
$ anyplayer track      # name of the current track
Blue Monday
$ anyplayer album
Power, Corruption & Lies
$ anyplayer next       # changes track forward
$ anyplayer prev       #               backward
$ anyplayer playpause  # pauses if it is playing, plays if it's paused
$ anyplayer play
$ anyplayer pause
$ anyplayer voldown    # put the volume somewhat up
$ anyplayer volup      #                         down
$ anyplayer volume     # prints the volume percentage
100
$ anyplayer vote       # votes to go to next song (default number of votes is 5)
$ anyplayer name
iTunes
$ anyplayer launched && echo "a player is running" || echo "nothing running"
a player is running

Or in Ruby

require 'anyplayer'
player = Anyplayer::Selector.new.player

player.launched? # => true
player.name # => Rythmbox
player.artist # => "The Avalanches"
player.track # => "Frontier Psychiatrist"
#

Or in a browser

With the So Nice Web interface:

So Nice Screenshot

Contribute!

All contributions are welcome! Head to the Github issues to report bugs, questions or code. Also, check out CONTRIBUTING.md.

Here a few useful commands while developping:

$ ruby -Ilib bin/anyplayer  # Use the anyplayer command-line from source
$ bundle exec rake test     # Launch tests
$ bundle exec rake install  # Install from source
$ bundle exec rake console  # Launch console

License

MIT