Export the texts to a different file for each song?

Hi:)
I read (with my limited English) many threads on the subject but I found nothing that works, not even the two utilities that are recommended.
I have my mp3 / flac organized in many folders and subfolders. I would like a script that scannes them all and, for every song found containing the text, you create me a txt with the same name as the mp3. And of course, in the future I can easily re-import the texts :slight_smile:
This is because I often update my songs with better versions and by deleting the old files I also lose the translations :frowning:
Thanks

You can export data to one file per folder (I don't think it works for 1 file per track).
But if you also export the filename as part of each record, then you can import the data to exactly the from which you exported it.

If you update only one file at a time, then keep the old file until you have copied the whole tag with the function file list context menu>Copy tag and pasted the tag data to the new file, this time with file list context menu>Paste tag.

Please note that the data has to be one line of text per file. So if you export fields that have line breaks, you have to remove them.
Also, you have to find a unique field separator, the separator must not be part of the exported text as otherwise the number of referenced fields will not match the data.

thanks :slight_smile:
sorry could you tell me what, in your opinion, is the solution closest to what I want?

consider that I download discographies so I can't do the very long work you tell me, (if I understood correctly the fact of having to keep the old songs, import the tags and then pass them to the new ones)

If it's really not possible to do what I want, a script that creates a file for each album could be fine for me, is it possible?

The standard csv-script should be a fair basis.
Please note that you may have to add a field for the %_filename% as identifier for the record.

sorry but is hard for me. The csv that I have use it create only one .csv file and without the lyrics :frowning:
Is strange there aren't a good solution for a question so important, I think everyone has the problem of saving their texts

I don't.

That is why I said that the csv-script is a good basis. Naturally you can add the references to fields that you have in your files and delete those that you do not need. From the distance I cannot guess which fields you might need.

To treat lyrics in export scripts, see

Indeed, the export function usually only creates a single result file but that has the data for all selected files. That is why the filename should be part of each record in that file so that MP3tag can align data and target file during import.

I don't need field special. When I change the mp3 with other better, I use Always the same name (tracknumber - title). I m looking for a script that read the title and import che corrispondent lyrics :slight_smile:

Sorry maybe I'm unclear why I use Google translate. If a song is called

10 - Comfortably numb

when I find a better version I rename it with the same name.

10 - Comfortably numb

So I would like Mp3Tag to export the lyrics to me (and maybe the cover included in the mp3, it would be the maximum ^ _ ^) and then let me re-import everything when I found a qualitatively better version of the song

to export the lyrics use an export script like
$filename(csv,utf-16)$loop(%_filename%)
%_filename_ext%/%track%/%title%/$replace(%unsyncedlyrics%,$char(13)$char(10),#)$loopend()
(A little testing is required on your side to see if it works)

To export a cover use an action of the type "Export cover to file" (see the help: http://help.mp3tag.de/options_format.html#exportcover)
Filename: %_filename%

To re-import that data create an action group with the following actions:
An action of the type "Import text file" (see the help: http://help.mp3tag.de/options_format.html#textfile)

Pattern: %_filename_ext%/%track%/%title%/%unsyncedlyrics%
An action of the type "Format value" for UNSYNCEDLYRICS
Format string: $replace(%unsyncedlyrics%,#,$char(13)$char(10))

To import the cover, use an action of the type "Import cover from file" (see the help: http://help.mp3tag.de/options_format.html#importcover)
Filename: %_filename%.jpg

I have created the script fro export and it work :slight_smile:

can you explain to me exactly what to do for the rest? Sorry but I don't understand anything of what you wrote and I think your help could be useful to many people

Did you find the action to export the cover? You would need to park it in the folder before you can import it to another file.

Now,
to get the data from the text file into a tag field, you can use the function Convert>Tag-file - Tag".
You have to tell MP3tag where to put which piece of data.
As you exported the data with

which led to a line in the text (e.g.)
5 - obladi.mp3/5/Obladi Oblada/Obladi Oblada#life goes one
you now have to define a pattern for the function "Convert>Text-File - Tag" to tell MP3tag which part of the long string is meant for which field.
So use the same list of fields that you used for the export:

Pattern: %_filename_ext%/%track%/%title%/%unsyncedlyrics%
this should select the line where the data matches the filename and then put
5 into TRACK
Obladi Oblada into TITLE
Obladi Oblada#life goes one into UNSYNCEDLYRICS

As you probably do not want the "#" but see the line breaks again, replace the # with the 2 control characters 13 and 10 which represent the line break:

The last action to import a cover should be easy to test; I don't repeat it here.

No, no, I found the script to export the covers. You gave me links that lead to generic info but for me they are too complicated.
There are no problems if the cover is extracted in the folder, even if often there is already a photo called Front.jpg

"I know the same list of fields that you use for export" is hard for me. Please write exactly what I must put in the script :frowning:

Thanks for your patience but I'm doing my best

if you don't have time, forget the part of exporting the covers, it's not essential, I can import them with Mp3Tag.

Are you looking for a script that imports covers from the internet?
Otherwise if you have an old source file with embedded cover, then it would be fairly easy to extract that cover to the file system (folder) preferably with the name of the audio file. That is why I suggested the name "%_filename%" which takes the filename from the audio file.
If you want to embed that picture again into the new target file, then you have to use the dedicated action. This cannot be done with an import from a text file.
And if the picture file has the same file name as the audio file then MP3tag can easily find that specific file in the file system.
I already described the steps.

If you have further questions, then it would be easier to see perhaps in screendumps what you have already done. Otherwise, I probably have to repeat myself over and over again.

forget all the talk about the covers :slight_smile:

You wrote the script to export the texts but you didn't write the script to import them (or at least I didn't understand what it was) :frowning:

OK, no more covers.

The procedure to import data again has been described in this post:


following the "Now," in the second paragraph.

I have created an .mta file with

%_filename_ext%/%track%/%title%/$replace(%unsyncedlyrics%,$char(13)$char(10),#)

and don't work...It's all that I have know

This instruction is part of the export script.
"mta" indicates an action - so what kind of action did you create?
An action to import data from a file needs the filename of the text file and a list of fields.

for now I have created the .mte with your script for export, and I think it work.

Then, as I told you, I didn't understand anything about what you wrote to import the lyrics and I created a .mta file because I thought you were talking about that

for import the lyrics I have click on Action (Quick), select Import text file, field LYRICIST and select the file generated by your script but don't import the lyrics :frowning: