https://github.com/syxanash/rubomote
Remotely control iTunes with Ruby + WebSocket app
https://github.com/syxanash/rubomote
itunes ruby sinatra
Last synced: about 2 months ago
JSON representation
Remotely control iTunes with Ruby + WebSocket app
- Host: GitHub
- URL: https://github.com/syxanash/rubomote
- Owner: syxanash
- License: mit
- Created: 2017-04-02T08:33:21.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-20T20:45:33.000Z (about 3 years ago)
- Last Synced: 2025-04-04T00:43:38.118Z (about 1 year ago)
- Topics: itunes, ruby, sinatra
- Language: HTML
- Homepage:
- Size: 251 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# rubomote :musical_note:
remotely control iTunes over Wi-Fi using Ruby.
## Demo
[](https://gfycat.com/FakeDistantBorderterrier)
alternatively you can also :boom: **shake** :boom: your smartphone to change song *(just don't do it with your laptop)*
[](https://gfycat.com/LinearFeistyIndigowingedparrot)
## Getting Started
### Dependencies
Check `Gemfile` to see all dependencies required or just run:
```
bundle install
```
this app also requires **cowsay** and **lolcat**:
```
$ gem install lolcat
$ brew install cowsay
```
and you are ready to go.
### Run the app
Download this repo or clone it. Run the app with the following command:
```
$ ruby app.rb
```
now open the web browser on your device and type the ip address of the server **followed by port** `4567`; you can check your ip address with `ifconfig` command and look for `inet` address on interface `en1`. After that you should see the web app asking for the secret pin generated randomly on the terminal like so:

Copy it into the login page and once you've clicked on **Verify** you should be able to control iTunes with your smartphone.

[Here](https://asciinema.org/a/120635)'s an example of how to set up rubomote server.
## Lyrics
If you want to get lyrics when you're listening to a song, simply add your **client access token** from [genius.com](https://genius.com/api-clients) to `rubomote_config.json`. Once the token is stored inside rubomote configuration file you'll be able to get the lyrics of the current song played by clicking the green button under the volume bar, see the picture displayed before.
I've also written a command line tool to download lyrics from genius.com, check [this](https://gist.github.com/syxanash/f9a21f21d2bbad43d7eae0f969efe0b6) out!
## Tested OS
* OS X Mavericks
* OS X Yosemite
* OS X El Capitan
* macOS Sierra
Unfortunately this app currently works only on Macs due to **itunes-client** library which uses AppleScript scripts to control iTunes.