Hello from a new forum member. First I'd like to thank the developer for the very versatile Mp3tag. It's so powerful, yet easy to use. A flexible tag panel, actions, functions, regex, action groups, tag sources - the palette of well implemented, efficient tools is impressing and simply unmatched! So I use Mp3tag exclusively, no reason to dabble with lesser taggers.
Here's my feature request. The export action lets you loop data from multiple files and write it to a textfile. I often use this in my action groups to gather data from the album tracks, and then subsequently import the textfile back to the audio files in a second action group for comparison and/or further processing. Since this requires two action groups, I have lots of "Action group A" and "Action group B" which must be executed consecutively. Because they build up and are frequently used, it would be easier if I could join these duos and handle them as single action groups instead.
So, I thought I'd ask if any of the following ideas could be considered (or is on the map).
Would it be at all possible to write the content of the export to a tag instead of a textfile? Something like $tag(field) instead of $filename(example.txt) in the .mte file. A fixed output/target field would work as well.
Could the new Copy as Text feature be implemented as an action with a target field?
Perhaps action groups could be divided into sections, so that exports could finish within each section, before the next section starts?
#1 would still let you use export loops and would only require small changes to your existing action groups.
#2 would not require export loops (since Copy as Text gathers the data from the selected files).
#3 seems somewhat experimental, but I wanted to share everything I've come up with.
As you do not tell us what the further processing looks like it is hard to say if such a feature would be sensible, whether there are already existing functions or if there are possible workarounds.
This can already be accomplished within mp3tag using the Format Value function. You can use any existing field or create a personalized custom tag if you prefer. You can combine any number and combination of existing tags this way.
The contents of the export is only available after the loop has been completed - and then all the data from the export script would be written to all the files - is that what you want?
It is already now possible to run several action groups in sequence. You have to arrange in the required order in the Actions>Actions dialogue and tick those that should be run.
You can already now copy the data from at least all the data from the set fields of one file to a field of your choice with an action of the type "Format value".
How would you identify the data from the export to belong to which file?
When you select a group of files in Mp3tag, you have already loaded their data into memory and displayed it. You can then process some or all of it in a great variety of ways.
So please tell us why you need to export and then re-import this data. What exactly does this permit you to do that you cannot do directly within Mp3tag?
Since you are requesting a new feature, it is up to you to explain the need for it in detail. So far you have not made the case.
Yes, writing the export directly to tags, negating the need for the two-step export/import via text file. If it's possible.
I used to tick, but two problems have arisen, so I don't do it any longer.
First of all the ticking has become impractical, since I'd have to scroll through hundreds of group names. (My action groups are many, but since they are nested they are perfectly manageable in the actions menu instead where they are merged & sorted nicely.)
Secondly, ticking doesn't work well with export/import combos since the export from the first action group is written too slowly to the hard disk, so the second action group fails to import the unfinished textfile. At least in my testing.
Hence the idea about sections in action groups, but I suspect it's not straightforward to implement.
You wouldn't have to identify, since all collected data would go into all files - that's the whole point. Currently Copy as Text gathers data from each file and combines it, but you have to manually paste it into tags. The idea in this case would be an action of the type "Copy as Text" which writes to tags directly, so you can use it in an action group.
As far as I understand the action to export it calls an existing export script with all the code.
But if you call the import from a text file with an action, then the whole text file is imported into just 1 field - so no separation takes place. This is ideal to import the lyrics with several lines into the lyrics field.
If you use Convert>Text file-Tag you can set a mask (a matching format string) to distribute the data from 1 record into several fields - but you have to keep the format of 1 line = 1 record. Using the filename as part of the record would assign one particular line to one defined file, ignoring the rest.
I still do not see the application that you have in mind: Do you want to export a number of tag fields to a target (be it a file or the clipboard) and then import that data to a different set of files?
Or do you have 1 template file from which you export just 1 line with the data from a number of fields and then import that single set to a number of files?
Could you shed some more light on the whole workflow?
My immediate thought would have been: assign the data from 1 file to several file with the help of the tag panel.
You say that you import the data from the text fle
How do you compare? Visually? Could you give an example?
Actually the question was quite valid. Understanding how you are using the data gained from looping the export, and then reimporting to each file is the important part. Without this context it is hard to grasp what your end goal is, where either the development can add the function you seek or an alternative method to get what you want can be provided.
On rereading, it occurs to me that this gives results similar to the Mp3tag context menu commands Tag Copy (Ctrl+C) followed by Tag Paste (Ctrl+V) into the target files.
Although this operation cannot be included in an Mp3tag Action, it is by nature a batch operation and one Tag Copy / Tag Paste sequence can fill hundeds of target files. And it is very simple — No export loops are needed.
The only caveat is that the sort order of the target files must be the same as that of the source files.
Tag Copy copies the whole tag (=all fields) of each file separately, i.e. no loop.
Copy as Text lets you copy only what you desire by defining the format string. The outcome of each file is looped into a joint string.
I really like the recently added Copy as Text and think it would be perfect if you could use it as an action.
See the target field in Format value. That's what I'd like for Copy as Text - an action with a target field so you could utilise the looped string directly (e.g. "loop files" or "join data from files").
This is one of the three approaches I suggested in my first post.
(I don't know why it says "4" instead of an arrow in the pictures - it's probably a wine/linux issue.)
This is not correct. You get the tag data from all files, split up in separate records.
This means:
If you select more than 1 file and copy the tag, then you can paste that data to more or less any amount of target files and the files get a subset or multiple of the copied source data.
So if you copy the data from 1 source file and paste it to e.g. 4 files, then 4 files will have the same tag data as the 1 source file.
If you copy the data from e.g. 8 files and paste it to e.g. 8 target files, then the first target file gets the data from the 1st source file, the 2nd target file that from the 2nd source file and so on.
If you use the same 8 source files but paste it to only 4 target files, then the data from the first 4 source files gets pasted to the 4 target files.
I ask you again: how does the real use-case look like? Could you show us sample data, describe the steps as accurate as possible and show us what you do with the imported data?
You have a list of multiple target files you want to update.
The changes required are based on information spread across each file. But mp3tag (in its current design) does not compare separate files.
Use the loop function to export the desired data from all target files to a single new text file.
Import the entire contents of this text file to a temporary (?) field in each of the target files.
Use the temporary (?) field data that contains the required test details from all of the files in the target list to compare with each individual file.
Run one or more Actions depending on the results of these comparisons. These need to be executed in a correct sequence to achieve the final desired changes.
This is possibly the only way to truly compare data from multiple files as it stands now. From your original post your points 1. and 2. are handled by my points 1. to 5. and cannot be done by an export to each file directly since the combined data from the loop would not be complete.
The request in your point 3. to execute multiple Actions in steps is already possible by creating each distinct action first, then creating an Action Group to combine them as needed.
But really what would help here is some context. Rather than dealing with arbitrary steps to get to some unknown result, please share what you currently have in these files and what you are trying to achieve in the end. Perhaps there are alternative methods to get this done that can be shared.
What is not correct? Perhaps we define a "loop" differently. Let's say we have three tracks with the following fields:
TRACK=01
GENRE=Pop
TRACK=02
GENRE=Rock
TRACK=03
GENRE=Jazz
If you use Copy as Text to copy GENRE you would get PopRockJazz combined into one string (but separated by line breaks). This is a loop.
If you use Tag Copy you would get "the tag data from all files, split up in separate records" as you wrote. This is not a loop, merely records in a table.
Do you disagree to this? It's how I see a loop, don't know if it's scientifically correct.
Yes, and it's what I currently do as described in my first post. Hence my request.
Not currently, which is why I ask if it would be possible to implement it, either as my point 1 or 2 in my first post suggests. This question is meant for the developer obviously.
The loop is completed so the combined data is already in RAM memory. Then it's a matter of exporting/writing it to a textfile or to a tag field. In the latter case it requires a different implementation of course.
That's not what my point 3 is about. And it's not a request per se, it's one of possible approaches to reach the end goal. If you're suggesting to setup an export/import combo within the same action group, it won't work since the export action don't have enough time to execute before the import, so it will fail. Plus exports are always performed at the end of the action group, no matter of their position (if I'm not mistaken).
I'm convinced that there are no alternative methods that can solve it. You simply can't do it in one action group currently. And that may be the end of it, but I thought I'd make this request just in case.
Yes. this is the case right now. You can define which fields are queried.
I just used "Copy as Text" with just %genre% as format string and got
Klassik
Rock
Elelctronic
Downtempo
Ambient
Sound Clip
Ambient
Klassik
And this string can now be copied to a field.
As far as I understood your workflow you want to get that manual interaction to be automated - but as you have selected all the files anyway, wouldn't the manual interaction with copying the contents of the clipboard be just as fast? Esp. if you want that data
How would the further processing look like?
Would it be enough to add access to the clipboard contents with a pseudo variable like %_clipboard% to be used in functions that allow generating format strings?
You have yet to share what you are actually trying to accomplish. It is difficult to assist you further without some idea of your current data and what you want to get to.