Text File -> Tag [Help Needed]


So I've figured out the export tags to text file well enough.
Having trouble going the other way.

Simple case:

I want to export "%_filename_ext%" and "%unsyncedlyrics%" to a file so I can re-import the lyrics later to different files with the same filename.

I set up an export so that the format string is "%_filename_ext% / %unsyncedlyrics%"

Every way I try to format the output or input, the import crashes.

Is %unsyncedlyrics% not compatible with Text File -> Tag because of the line breaks?

Could I create an action that replaces line breaks in the lyrics tag with a character string such as "LINEBREAK" so that the export and import should work (and then run another action later to replace "LINEBREAK" with line breaks)?

Or is there also a line length limit that I would encounter?



PS: I'm also trying to figure this out so I can run all my lyrics through an external spell checker in one long text file; make the changes, and re-import the lyrics to their correct songs....


Sounds, that the first step has not been figured out well enough.

That is a question of what can be defined as 'compatible', but ... yes.
You should have to make it 'compatible' for yourself.

Do deeper research in the forum. There are many threads in the Mp3tag forums regarding export and import of unsyncedlyrics multi-line text.
You can find there some proper working solutions:

You can do someting like this ...
... replace the linebreak with a surrogate character or a string of surrogate characters.
For example ...
... before export replace $char(13)$char(10) with ' %§$!&* ' and after import replace ' %§$!&* ' with $char(13)$char(10).
For example ...
... before export replace $char(13)$char(10) with ' LINEBREAK ' and after import replace ' LINEBREAK ' with $char(13)$char(10).
For example ...
... before export replace $char(13) with ' ' and $char(10) with ' ' and after import replace ' ' with $char(13) and ' ' with $char(10).

Not documented - don't know.

There are also proposals in the forum how to handle a large text file, which contains multiple sections of unsyncedlyrics text snippets.

'Flskydiver', good idea to work out this theme, this could help the Mp3tag community people, please come back and share your solution with us.



No, really, I figured the export part out well. I have exported a really nicely formatted single text file with the lyrics to all my songs; with separate sections for each artist (sorted by Name) and within each artist section a section for each album by that artist (sorted by chronological release date) and then within each of the sections each song is listed (with it's lyrics) sorted by disc and track number. It's really neat - and helps a ton when I want to copy & paste lyrics from say, an album track to a live version of that track.

When I used "/" as a separator in my example I was just going off the example listed here: "http://help.mp3tag.de/main_converter.html#tff" and trying to simplify it as much as possible.

My problem was with getting the imports to work, but I will try replacing the line breaks in the lyrics field to see if that works and get back to you.

I plan to. When I finish this project, I should be able to write up quite a bit about what I learned. I'll have lots of (hopefully) useful custom actions and other settings to share. For example, I developed some pretty handy techniques for simplifying my .mp3 artist and tile names, or using variations thereof, to have more success pulling in lyrics during automated online database searches; and yet preserving the original more precise names for restoration back to their normal places after successfully downloading the lyrics...


So as a side project I'm trying to offload my lyrics to a single-file HTML database via the export option.

What I've got so far is actually pretty good, I think.

When you load the exported HTML file. what you will see is an alphabetically sorted list of all the ARTISTs in your collection (sorted by %artistsort% if it exist, and %artist% if it doesn't).

When you click on a particular ARTIST, a previously hidden list of all their ALBUMS (sorted chronologically by year, and then %albumsort% if it exist, and %album% if it doesn't) appears.

When you click on a particular ALBUM, a previously hidden list of all the tracks on that album (sorted by %discnumber%, if it exists, and then %track%) appears.

When you click on a particular track TITLE, the lyrics appear.

Clicking on any ARTIST, ALBUM, or TRACK re-hides all the underlying content.

The visual format (expanded) is:

   Year - Album
      Disc No:Track No - Title
                                        <div align='center'>Lyrics</div>

This does utilize Javascript, so make sure you enable it if you've turned it off.

The export settings also look for the Compilation Album tag (%compilation%); and if they find it, they will list all applicable tracks by "Disc No:Track No - Title (Track Artists)".

What I still need to work on is adding an "Expand All" button up top. I'm not sure how to do it as I have Mp3tag create all the DIV ID's dynamically.

"Collapse All" is included as it is as easy as a refresh of the page.

I figured out the cause and solution for the glitch mentioned below, and the great news is it does not require ANY change to your tags. Everything is handled on-the-fly, and better yet, there is no stripping of apostrophes or quotations marks from either the original tags OR the output html!

Also, I need to work out a solution to a glitch occurring with any Artist, Album or Track that contains Apostrophes (') or Quotes (") which prevents you from revealing any of the hidden content for that Artist, Album or Track.

This occurs because Apostrophes and Quotes are used in the Javascript which enables the info to be hidden.

One solutions is, prior to export, remove all the Apostrophes and Quotes from your tag data. Not an ideal solution, but one that can easily be automated and non-destructive if you set up an action that creates alternative tag fields such as "ARTISTSAFE", "ALBUMSAFE", and "TITLESAFE" that you first copy the un-edited tag data to, before removing the Apostrophes and Quotes from "ARTIST", "ALBUM" and "TITLE" (as well as "ARTISTSORT" and the other -SORTs if you use them). After you export, you just copy the data back to their original tag fields and delete the -SAFE tags.

*I've use this method above to simplify my tags to make it easier to download lyrics but still save my more detailed track descriptions. I'll post on that later...

A preferred solution would be to figure out a way to strip Apostrophes and Quotes from the tag export output ONLY (not changing the original tags), or replace them with something else "on-the-fly" during the export.

Not sure how to approach that, though.


Updated the above code to include a link to the file so you can play back the song as you read the lyrics; See image at bottom for an example of the output.


Also, I started a thread here:

My Export to HTML Configuration (for Viewing Lyrics)

Lyrics_to_One_Big_Formatted_HTML_File__Updated_.zip (1002 Bytes)


Bump for whoever downloaded the previous versions that I updated to FINAL today.

*Fixed apostrophe & quote javascript coding bug
*Fixed lack of word wrapping for really long lines of prose
*Added support for special processing of tracks with Compilation tags

Please try and enjoy!


Bump for Version 4.

Added a menu and tweaked a few things.

Details here:

My Export to HTML Configuration (for Viewing Lyrics)

Lyrics_to_One_Big_Formatted_HTML_File__v.4_.zip (1.17 KB)


I think one thread for the export stuff will do it, no need to bump here.


Fair enough. Kill the thread if necessary. I really need to get some sleep ... don't think I've slept since I started messing with this stuff on Friday (30 some hours ago)... Heck, I might not have left my chair. Regards...