song_distribution - create a histogram of song distribution by year
This script demonstrates how to glean some information from your music collection. It generates a PNG image showing the distribution of songs in your collection by year. This is a simple way to show 1) when your quest for acquiring new music waned or 2) times in your life when you were in financial straits. It requires that the GD graphics drawing library and perl module be installed on your system.
Options [database] dsn the name of your database user database username, if required pass database password if required adaptor either dbi::sqlite or dbi::mysql (defaults to dbi::mysql)
Options [image] start starting year to display end ending year to display width [optional] the width of the image in pixels height [optional] the height of the image in pixels bground [optional] background color for the image as an [r g b] array reference fground [optional] foreground color for the boxes as an [r g b] array reference omit_totals [optional] pass true to turn off display of year totals
You may need to tinker with start,end and width,height to get an acceptable image depending on the range of years in your collection.
song_distribution --adaptor dbi::mysql --dsn music \ --width 800 --height 500 --start 1950 --end 2004 \ --bground 255,0,0
If running this script on a Windows system, you made need to modify this script, setting the output of STDERR to BINMODE prior to printing the image.
Todd Harris (firstname.lastname@example.org); $Id: song_distribution.PLS,v 1.1 2005/02/27 16:56:25 todd Exp $