= PheldItunesReporter

* http://rubyforge.org/projects/uwruby
* http://uwruby.rubyforge.org/pheld_itunes_reporter

== DESCRIPTION:

PheldItunesReporter provides a library and corresponding executable script that calculate and report statistics for a given iTunes library file. When executed, the script prints a text summary of all of the statistics it is capable of generating. It also creates four .PNG image files with graphs of key statistics.

== FEATURES/PROBLEMS:

The included library can generate the following statistics about the tracks in the iTunes library:
* total play time
* total number of tracks
* total number of genres
* total number of artists
* total number of albums
* average year
* N most popular genres
* N most popular artists
* N most popular years
* number of tracks added for each year
* correlation between bitrate and play count
* correlation between rating and play count
* guesstimated age of library owner

== SYNOPSIS:

To run the reporter script, simply navigate to the root of the source folder and type "./bin/pheld_itunes_reporter.rb <path_to_itunes_library.xml>". All supported statistics are then printed and four image files with graphs are written to the current directory.

The PheldItunesDataMiner library is used to parse the iTunes library XML and generate statistics. No parameters are passed to the 'new' method. To get statistics, a new data miner instance is created, then the 'parse' method is called. Once that has been done, the other methods for statistics generation can be used.

Example:
data_miner = PheldItunesDataMiner.new
tracks = data_miner.parse_file('iTunes\ Music\ Library.xml')
ten_most_popular_artists = data_miner.get_most_popular_artists(tracks, 10)

== REQUIREMENTS:

* Nokogiri >= 1.0.6
* RMagick >= 2.8.0

== INSTALL:

sudo gem install pheld_itunes_reporter

== LICENSE:

(The MIT License)

Copyright (c) 2008 FIX

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.