MP3html 1.2.4 by Ben D Canning (bdc@bethany.edu) http://ns.bethany.edu/bdc/warez/mp3html.html -- MP3html is a program used for making HTML (or otherwise) listings of your MP3s in a very customizable form using the embedded ID3 tags. It's coded in ANSI-compliant C and has been tested under Linux and DOS. MP3html is free for use and modification under the GNU GPL. 1.2.4 is just a bugfix release. It fixes a few things, makes stuff more configurable when compiling, and works under FreeBSD. We're getting ready for 1.3.0 when we'll have sorting and caching implemented. The new version (1.3.0) will have different syntax, so you'll need to change any scripts. 1.2.3 justs fixes a buffer problem in id3.c, slightly changes the behavior of the "--space" argument and adds support for putting any string in for empty fields. Read the file 'CHANGES' for more information. strnsub.c contains the function `strnsub()' and was written by Erik Bachmann. It was found in the Snippets Collection (http://www.snippets.org) and doesn't have an email address in it. If anyone has Erik's current email address, please tell me so I can thank him for his code. I lightly edited it. This is the only documentation for MP3html. Once I get 1.3.0 out, there'll at least be a FAQ. I hope to write some actual docs sometime soon as well. -- Installing MP3html is easy. If you got the normal source archive, then follow these steps (we'll assume you're under a Unix variant): % gzip -d mp3html-X.Y.Z.tar.gz % tar -xvf mp3html-X.Y.Z.tar % cd mp3html-X.Y.Z % make (The 'X', 'Y', and 'Z' are meta-characters for the current version since I'm too lazy to update this thing). To have it work properly under DOS, edit `mp3html.h' and change the DIR_CHAR define to '\\'. If you don't do that, it will still compile, but stuff like recursion and the %f tag won't work properly. If you can't compile it, try using the safe CFLAGS declaration in the Makefile instead of the default one. If you're hardcore, try using the heavy optimization CFLAGS in there. There's no "make dos" anymore so you'll have to do that by hand. Sorry. Then you can put the file `mp3html-X.Y.Z/mp3html' into your path somewhere (or install it in a global path if you're root, but that seems unnecessary). -- Execution of MP3html is also easy. Everything is specified on the commandline. The syntax is: mp3html HEADER MIDDLE FOOTER [-m M3U] [-r dir] FILE(S) > OUTFILE HEADER is the file that will go at the start of the generated list. It should contain stuff like the , and elements. MIDDLE is the main file that will be used once for each MP3 you specify. It uses a token replacement system that is described later. FOOTER will be tacked on at the end. It should contain stuff like the and closing elements and a link back to your page. FILE is the MP3 files you'd like to have on the list. The recommended way to do it is through wildcards (ie. ~/mp3/*.mp3) If you put a "-r" or "--recurse" before a filename, it will be treated as a directory and everything in it and it's subdirectories will be processed. This is a good way of cataloguing your entire MP3 collection in one easy command. If you put a "-m" or "--m3u" before the filename, it will be treated as a playlist and MP3html will run through all the entries in it. The parse code is very simple so the pathnames in the M3U need to be absolute filenames or relative to the current directory. The recurse option is a better method, really. OUTFILE is the file that will be generated. By default, MP3html writes to stdout (the screen), so you need to use the '>' to redirect it to a seperate file. Putting "-S" or "--space" anywhere on the commandline will cause MP3html to convert underscores to spaces in the %f and %F tags. This is really nice so your HTML doesn't stretch the screen if you use tables and have long file names. Putting "-M" or "--mp3only" anywhere on the commandline will make MP3html not process files that aren't valid MP3s. Putting "-u" or "--unknown" anywhere on the commandline will result in "Unknown Artist" being used for the %a tag if the file has an empty artist field in it's ID3 tag. If you put "--unknown-text" somewhere on the commandline, MP3html will substitute the next parameter for any empty fields in all the files it processes. This is useful for keeping tables looking good. Try doing --unknown-text " " if you use tables. -- For the MIDDLE file, MP3html uses a token replacement system very similar to the `printf()' family of functions in C. There are 9 tokens which can be put anywhere in MIDDLE. They are: %t - Title %a - Artist (if there is no ID3 tag, this is the same as %f) %A - Album %y - Year %g - Genre %c - Comment %s - File size (in bytes) %f - Filename without path (Stray_Cats-Rock_This_Town.mp3) %F - Filename with path (~/mp3/Stray_Cats-Rock_This_Town.mp3) -- Some sample files have been provided. They are pretty generic examples that can be used if you're too lazy to make your own. They are in the `samples/' subdirectory. -- I'm just releasing this version as a basis for version 1.3.0, which will add the features that everyone has requested: caching and sorting. That version won't include support for grouping by artist, but it will be introduced soon after. I'm very thankful for everyone who has sent me feedback and suggestions. -- As noted, this program is available at no cost. I'd really like it if you told me what you thought of it, though. And maybe you could send me a nice MP3 that I don't already have :). I like classic rock a lot (hint, hint). bdc@bethany.edu http://ns.bethany.edu/bdc/ ICQ UIN 5020266 (good luck finding me with the client open, though) -- EOF