Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

README and license.

  • Loading branch information...
commit 88e7cb1df775e6e4012a82fac29c3d839e947bc8 1 parent ddb2b44
@eostrom authored
Showing with 111 additions and 0 deletions.
  1. +25 −0 LICENSE.md
  2. +86 −0 README.md
View
25 LICENSE.md
@@ -0,0 +1,25 @@
+Copyright © 2011 Erik Ostrom. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the
+ distribution.
+
+This software is provided by Erik Ostrom “as is” and any
+express or implied warranties, including, but not limited to, the
+implied warranties of merchantability and fitness for a particular
+purpose are disclaimed. In no event shall Erik Ostrom or contributors
+be liable for any direct, indirect, incidental, special, exemplary, or
+consequential damages (including, but not limited to, procurement of
+substitute goods or services; loss of use, data, or profits; or
+business interruption) however caused and on any theory of liability,
+whether in contract, strict liability, or tort (including negligence
+or otherwise) arising in any way out of the use of this software, even
+if advised of the possibility of such damage.
View
86 README.md
@@ -0,0 +1,86 @@
+# Music Every Day
+
+This is a support script for my [Music Every Day][music] project. I
+have very specific needs, and I haven't made any effort to make the
+code more general than that, so I don't think anyone else will want
+to use it. But the code might be of interest, especially to anyone who
+wants to use MacRuby to script iTunes (and didn't get enough out of
+[Matt Aimonetti's post][itunes-macruby]).
+
+[music]: http://slapdash.erikostrom.com/tagged/music%20every%20day
+[itunes-macruby]: http://merbist.com/2010/01/17/controlling-itunes-with-macruby/
+
+## Usage
+
+There are three commands (as of this writing... but check `med --help`
+for current info):
+
+ med add [-g GENRE] [-a ARTIST] PATH
+
+Adds a file to your iTunes library. Automatically sets the album name
+and album artist to "Music Every Day" and me. Sets "year" to the
+current year. If the filename starts with an integer, extracts that
+and uses it as the track number.
+
+ med convert TRACK_NUMBER
+
+Finds the track in my "Music Every Day" album with the given number,
+and creates an MP3 version (or whatever iTunes is configured to
+create in its preferences).
+
+ med upload TRACK_NUMBER
+
+Finds the track (a la `med convert`) and uploads it to my web site,
+with more info in the filename because sometimes MP3s get separated
+from their context and it's nice to be able to identify them at a
+glance.
+
+## Commentary
+
+The most interesting parts of the code are the parts that control
+iTunes:
+
+1. add a track to the library
+2. modify track metadata
+3. search for an existing track
+
+iTunes might not be the right tool for this job. Certain things can't
+be controlled by this script - for example, the output format of the
+`convert` command, and the question of whether the library gets its
+own copy of the original audio file or uses the existing copy in
+place. And I might not even want the tracks in my library when the
+process is over.
+
+But it was a good chance to finally get some experience with MacRuby!
+Which is pretty neat.
+
+## To Do
+
+The main thing I want to add is a command that drafts a Tumblr post
+with some tags and the track URL and a link to the project, so I only
+have to enter my notes about the new track.
+
+It might also be fun to add a GUI, but I'm pretty comfortable with the
+command line.
+
+## Credits
+
+Obviously [MacRuby is key][macruby]. Other dependencies, for which I'm
+grateful:
+
+* Mike Williams's [Clamp][clamp], a nice library for parsing
+ command-line options and subcommands.
+* [require_all][require_all] by Tony Arciero and Jarmo Pertman, which
+ lets me load all my code without listing all of it.
+
+[macruby]: http://www.macruby.org/
+[clamp]: https://github.com/mdub/clamp
+[require_all]: https://github.com/jarmo/require_all
+
+## License
+
+Copyright © 2011 Erik Ostrom. All rights reserved.
+
+The code is available under a [simplified BSD license][license].
+
+[license]: LICENSE.md
Please sign in to comment.
Something went wrong with that request. Please try again.