Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunny/anyplayer
Interact with the currently running music player. Supports iTunes Mac, iTunes Windows, Spotify Mac, Rdio Mac, MPD, Rhythmbox, Amarok and XMMS2.
https://github.com/sunny/anyplayer
amarok itunes-windows mpd music music-console music-player rhythmbox ruby spotify-mac xmms2
Last synced: 4 days ago
JSON representation
Interact with the currently running music player. Supports iTunes Mac, iTunes Windows, Spotify Mac, Rdio Mac, MPD, Rhythmbox, Amarok and XMMS2.
- Host: GitHub
- URL: https://github.com/sunny/anyplayer
- Owner: sunny
- License: mit
- Created: 2011-01-18T00:32:10.000Z (almost 14 years ago)
- Default Branch: main
- Last Pushed: 2022-08-02T11:43:37.000Z (over 2 years ago)
- Last Synced: 2024-12-10T02:11:00.822Z (13 days ago)
- Topics: amarok, itunes-windows, mpd, music, music-console, music-player, rhythmbox, ruby, spotify-mac, xmms2
- Language: Ruby
- Homepage:
- Size: 88.9 KB
- Stars: 50
- Watchers: 5
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
Anyplayer
=========[![Gem Version](https://badge.fury.io/rb/anyplayer.png)](http://badge.fury.io/rb/anyplayer)
[![Build Status](https://travis-ci.org/sunny/anyplayer.png)](https://travis-ci.org/sunny/anyplayer)Interacts with the currently running music player.
Supports iTunes Mac, iTunes Windows, Spotify Mac, Rdio Mac, MPD, Rhythmbox, Amarok and XMMS2.Install
-------```sh
$ gem install anyplayer
```Use it in your terminal
-----------------------```sh
$ 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
----------In your Gemfile:
```rb
# Interact with the current music player
gem "anyplayer"
```In your code:
```ruby
require "anyplayer"
player = Anyplayer::Selector.new.playerplayer.launched? # => true
player.name # => Rythmbox
player.artist # => "The Avalanches"
player.track # => "Frontier Psychiatrist"
# …
```Or in a browser
----------------With the [So Nice](https://github.com/sunny/so-nice/) Web interface:
![So Nice Screenshot](https://github.com/sunny/so-nice/raw/gh-pages/screenshot.png)
Contribute!
-----------All contributions are welcome! Head to the [Github issues](https://github.com/sunny/anyplayer/issues) to report bugs, questions or code. Also, check out `CONTRIBUTING.md`.
Here a few useful commands while developping:
```sh
$ ruby -Ilib bin/anyplayer # Use the anyplayer command-line from source
$ bin/rake test # Launch tests
$ bin/rake install # Install from source
$ bin/rake console # Launch console
```License
-------MIT