iTunes (from Ruby)
A CLI and library for manipulating iTunes and your iTunes library on OSX.
It can be useful for bulk-importing or editing tracks, particularly when you don't like mucking around with AppleScript (though it does use osascript(1) for its heavy lifting).
Also useful is the ability to control iTunes from another multi-media manager which might be using ruby, or for writing scripts to help you get things done.
It speaks JSON, which makes it relatively painless to transport iTunes meta-data around, and uses Mustache for some templating, so you could pretty much export your library to anything you like.
This will be of very limited use on any machine other than a Mac (or something which has an OSA bridge), but users of other OSs tend to have decent media management tools available to them anyway.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install itunes
The CLI is pretty thoroughly documented - run
itunes help to get started.
There's a Rakefile which runs tests. It will pollute your iTunes while running, as it adds a sample file to the library, and mucks around with it.
If you don't have osascript(1) available, then it will skip those tests that actually run scripts.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Requesto