I have various scripts that I use to import and export iTunes info to MySQL. This lets me keep metadata between libraries and if I delete and re-add tracks.
I was trying to export the lyrics field to SQL (thru a shell script). Since the lyrics has paragraphs and carriage returns, it seems I need to turn the lyrics into a string without the CRs before I can export it. I’m having trouble doing that. I’ve tried searching and replacing CRs without success. Maybe someone can offer some help?
Though I’m not sure exactly how to convert the string back to one that includes carriage returns. I can do a search and replace with \n; it works but seems a hack and not so elegant.