#!/bin/sh # miTunes - A simple rss .xml mp3 playlist generator. # # Originally intended for use with the Sony PSP and Mac OS X. # # miTunes creates a named playlist of a specified directory containing # an album's mp3 files. # # Version 0.4 # # Usage: mitunes name_of_artist genre pathname_to_mp3_files # # Example: mitunes dave_koz jazz music/dave_koz/off_the_beaten_path # or: mitunes dave_koz jazz musi*/dave*oz/off* # # These examples will create an .xml playlist named "0off_the_beaten_path.xml" in # the current directory. The playlist will be suitable for RSS on the # Sony PSP. # # Bugs: no error checking # # NOTE: if using Mac OS X, uncomment the 822-date line below; # under Linux, use the date command with the -rfc option, else # RSS feed on the Sony PSP will fail. RSS .xml for the PSP # must use RFC822 or W3C date/time formatted strings. # # In this version you must also edit the embedded URLs for your setup. # You should be able to see where to make the edits, right? # :-) # # TODO: Sony's specs provide for image, music, and video streaming for the # the PSP handheld, so this script could be expanded to support creation # of other streams, and the addition of many features, such as thumbnail # images. You can find examples through: # # http://www.sonymediasoftware.com/support/default.asp # # In particular, look for the document "PSP Media Manager Specifications # for Feed Providers and Feed Publishers." Some examples may be found # at: # # http://www.mediasoftwareapps.com/feeds/FeedList.opml # http://www.mediasoftwareapps.com/feeds/PhotoExample.asp # http://www.mediasoftwareapps.com/feeds/MusicExample.asp # http://www.mediasoftwareapps.com/feeds/H263VideoExample.asp # http://www.mediasoftwareapps.com/feeds/H264VideoExample.asp # # Note that video streaming apparently isn't supported by 3.03 or lower # PSP firmware! Perhaps Sony is simply using the PSP as a test ground # for the PS3's on-line battlefield against Xbox? # # Create playlist .xml header echo " $1 http://192.168.1.102/~bball/psp/music/ user-generated psp mp3 playlist en-us 2007 Mon, 29 Jan 2007 06:20:09 GMT linux_author sue_mee@yoohoo.com " > 0$1.xml # loop through designated directory for file in $3/*mp3 do echo " $file $2 $(822-date) # $(date -rfc) " >>0$1.xml done #end of playlist.xml echo " " >>0$1.xml