/* * ExportHTML.mmx * * * ©1997 Andreas Mair * * * Version: 1.00 * Date: 19.07.1997 * * Function: A simple ARexx-Script for use with MusicManIII. * This script will read all records of the currently open file * in MusicManIII and write it to an HTML-file. * * The output consists of three HTML-files: * * - index.htm open this file in your WWW-browser * (must support tables and frames!) * * - contents.htm this file is displayed in the left frame * it shows alphapetic links to let you jump * quickly to those records * * - data.htm this file is displayed in the right frame * this file contains the records' data in the format: * * Artist * Title * Songs Length (for every song) * separator * * NOTE: * this script will always overwrite the files "contents.htm" * and "data.htm", so you have to rename the files if you want * to keep them. * * the file "index.htm" is never created! Don't loose it ;-) * * Requirements: MusicManIII V3.06 (or above) * ARexx running * * Usage: - first start MusicManIII and load the file you want to export * - go to a CLI (or Shell) and start this script ("rx ExportHTML.mmx") * */ ADDRESS 'MUSICMAN' OPTIONS RESULTS QUERY RECORDSCOUNT MaxRecords=RESULT RECORD GET NUMBER 1 CALL OPEN( "cont", "contents.htm", 'WRITE' ) CALL OPEN( "data", "data.htm", 'WRITE' ) CALL WRITELN( "data", "" ) CALL WRITELN( "cont", "" ) LastChar=' ' DO i=1 TO MaxRecords SAY "Working on record #"i" of "MaxRecords QUERY ARTIST TITLE SONGSCOUNT SUBRECORDSCOUNT STEM record. IF LEFT( record.artist, 1 )~=LastChar THEN DO LastChar=LEFT( record.artist, 1 ) CALL WRITELN( "cont", ''LastChar'
' ) CALL WRITELN( "data", '' ) END CALL WRITELN( "data", "

"record.artist"
"record.title"


" ) CALL WRITELN( "data", "" ) DO j=1 TO record.songscount QUERY SONG LENGTH BPM SPECIAL STEM song. CALL WRITELN( "data", "" ) SONG NEXT END CALL WRITELN( "data", "
"j""song.song""song.length"

" ) RECORD NEXT CALL WRITELN( "data", "") END CALL WRITELN( "cont", "" ) CALL WRITELN( "data", "" ) CALL CLOSE( "cont" ) CALL CLOSE( "data" )