Dienstag, Juni 12, 2007

generate my music db

Only a view weeks ago I refreshed my knowledge about lex and yacc by using it for an other project. So I used both to parse my downloaded cddb files. But some files contained additional data I added. This was mostly done for classic CD's. Parsing this free data got very quickly very complicated. Also merging this data with the XML data, I generated ripping the CD (error count from cdparanoia), was nothing I liked doing in C.

Reading the cddb file and converting it with C into XML. Then merging both XML files with perl. Why not use perl to read the cddb file directly?

Could not use CDDB::File as it ignored my additional infos without any notice. Instead of searching this notes by hand I will write my own perl parser.

This will be done in two steps:

simple entries

In the first step the cddb parser and the XML structure will be implemented as if I never had added some additional information. At any time an exception to the expected structure is found this CD will be ignored in the first step.


Rules to handle the additional notes will be added. If the rule will become to complicated the additional data will be reformatted or added by hand into the database.

In the future I will add additional data only in a way the rules added at step two are able to read them.