Feature request: Import tags from clipboard

Bump...

Florian, are you able to provide some sort of indication whether this suggestion is likely to be included in a future release?

Thanks
egd

Yes, I like the idea and already put it on my internal wish list.

Kind regards,
Florian

Thanks, I look forward to it :slight_smile:

Quite the necro bump I realize. Was this ever implemented? Was looking for a way to parse clipboard content into track tags but there doesn't appear to be a way outside of using a text file.

There have been several threads with this feature idea, and it would very useful for quick formatting of files like podcasts where a user could copy text from a page and format the data into tags with regex and such.

If you want to paste any arbitrary text from the clipboard to tags, you would have to overlay some kind of structure that assigns the correct data to the corresponding field. You have to come from unstructured to structured data.
I doubt that there are many sources of information around that use the MP3tag field-language.
A way to import data (which then takes the step to force you to supply the structure) is the text file that you mentioned.
Or you use a web-source script which in a way does the same as it parses a text for structurual information.

Of course you can paste data into a single field and then use actions and stuff to distribute it to other fields. But that is also already possible.

Once you have any text on the Clipboard you can paste it into one tag-field, into one ore more files at once, using the Mp3tag "Tag-Panel" or the "Listview" or the dialog "Extended Tags".

If the input data has a file/track-oriented structure, line by line, or block by block, ... track-related data, then use the Mp3tag scripting language to fetch the corresponding data, trim the data to the meaning of the tag-field within the underlying file.
A proper set of Mp3tag action commands can do this.

Because there exists no standard definition to do so, you have to create one "actions-group adapter" for each case of incoming un-/structured input data.
If the input data supports a data structure like "Key=Value", the data mining would be relatively easy.

DD.20150103.1218.CET

Mmm. The idea was to make a per-podcast formatting action that would take apart the inputted text and use it for multiple tags. Perhaps I'll have to paste it into the Comment field first before running an action in that case.

For example, here's the format of one Podcast feed:

Filename: Platos-Cave-20141215.mp3
Default Title: Plato's Cave - 15 December 2014
Default Artist: Triple R
Default Album: Triple R
Description from feed (would be copied to clipboard):

The team discuss their favourite cinematic releases of 2014. With Thomas Caldwell, Tara Judah and Josh Nelson.

The intended output would be:

Filename: 2014-12-15.mp3
Title: 15th December 2014
Artist: Thomas Caldwell\\Tara Judah\\Josh Nelson [extracted from the description]
Album: Plato's Cave [always the same]
Comment [everything past 'With...' cut]:

The team discuss their favourite cinematic releases of 2014.

I'd imagine regex would be able to help with this. Being able to query the clipboard would be useful, but I may try experimenting with pasting into the Comment field first.

You can paste the incoming Clipboard text into any user defined tag-field, having a name of your wish.
You can format other user defined tag-fields with the value from this first helper tag-field or with other intermediate values.
You may do what you want with the data.
Please provide a simple text file with an example content from the Clipboard.

DD.20150103.1316.CET

Yeah, it's a few extra clicks but at the moment it seems the best method :slight_smile:

Sure, attached one below. The podcast description in my post above was the only clipboard content that would be used for that podcast:

The team discuss their favourite cinematic releases of 2014. With Thomas Caldwell, Tara Judah and Josh Nelson.

All the podcast descriptions from that show follow the same structure. Another example:

White Reindeer and A Girl Walks Home Alone at Night are reviewed along with a selection of upcoming December releases. With Cerise Howard, Josh Nelson and Thomas Caldwell.

After the description like the above is copied it would be pasted into the Comment field, after which an Action would extract the Artist tags (the names after the 'With') into a multi-value Artist field, if I can somehow find the right regex :stuck_out_tongue:

Haven't begun writing the Action yet though, as this was just in my head as an idea to save time when downloading and tagging the weekly podcasts.

Clipboard_example.txt (110 Bytes)

For this simple case ...

Action : Format Value Field : ARTIST Formatstring: $regexp($regexp(%CLIP_IN%,'^.+?\.\sWith\s(.+?)\.?$','$1'),'(,\s|\sand\s)','\\\\') ... or ... Formatstring: $replace($cutRight($cutLeft(%CLIP_IN%,$add(6,$strstr(%CLIP_IN%,'. With '))),1),', ','\\\\',' and ','\\\\')

DD.20150103.1439.CET

Woah, this is perfect! Cheers DetlevD :slight_smile: I used the Comment field as the %CLIP_IN%.

One thing I've been trying to figure out with this is how to also remove the same text from the Comment after the first regex action has run, removing the text from the '. With' onwards, eg:

The team discuss their favourite cinematic releases of 2014. With Thomas Caldwell, Tara Judah and Josh Nelson.

Couldn't understand how to tell Mp3Tag to cut n characters from that point when the number isn't known. It's probably something obvious I'm missing.

Update: using $len() does the trick! This will save so much time.

Action : Format Value Field : COMMENT Formatstring: $left(%CLIP_IN%,$strstr(%CLIP_IN%,'. With '))

DD.20150103.1518.CET

The action is now ready which is awesome. Just one last thing - is there some way to sort/re-arrange the Artist field names? I searched and found two threads about this (here, and here), and it's a solid idea. I was looking for a custom order though:

From: Josh Nelson\\Cerise Howard\\Tara Judah\\Thomas Caldwell
To: Thomas Caldwell\\Josh Nelson\\Tara Judah\\Cerise Howard

Tried various formatting, but couldn't get anything to be ordered correctly. As some of the hosts/artists aren't there for every episode some names may be missing on certain weeks.

Was attempting this order:

(Thomas Caldwell) (Josh Nelson) (Tara Judah) (Cerise Howard)

What would be the correct RegEx format for targeting whole words separated by backslashes (\\) if not every name will exist on some episodes?

Mp3tag has no reasonable method to sort the values within a multi-value tag-field, ...
because of a missing function $itemsort(text_string,separator_string,case_flag) or such alike.

If you want to manually arrange the order of values within a multi-value tag-field, then you have to address each single value by the function $meta(x,n), and then combine the values in any order of your wish.

Example:
From ...
ARTIST (mv)=Josh Nelson\\Cerise Howard\\Tara Judah\\Thomas Caldwell

Artist 1 is $meta(ARTIST,0) is 'Josh Nelson' Artist 2 is $meta(ARTIST,1) is 'Cerise Howard' Artist 3 is $meta(ARTIST,2) is 'Tara Judah' Artist 4 is $meta(ARTIST,3) is 'Thomas Caldwell'

Using ...

Action : Format value Field : ARTIST Formatstring: $meta(ARTIST,3)'\\\\'$meta(ARTIST,0)'\\\\'$meta(ARTIST,2)'\\\\'$meta(ARTIST,1)

To ...
ARTIST (mv)=Thomas Caldwell\\Josh Nelson\\Tara Judah\\Cerise Howard

DD.20150103.1818.CET

Ah, useful function. Can the $meta() function also be used conditionally in some clever way?

The issue is each episode the artists change, sometimes fewer/more or a different order in the sentence.

Examples:

With Thomas Caldwell, Tara Judah and Josh Nelson
With Cerise Howard, Josh Nelson and Thomas Caldwell
With Josh Nelson, Cerise Howard, Tara Judah and Thomas Caldwell

So the order of the $meta() changes too. Is there any way to tell Mp3Tag to the effect of:

If 'Thomas Caldwell' exists in the Artist field set as 1st in order, if 'Josh Nelson' exists... set as 2nd in order, etc?

Or is that a bit out of scope for the program?

Just an idea ... how to order a new list of values, following the order of values in a given list.

Ordered List Order: 1 2 3 4 5 6 Items: Abc|Def|Ghi|Jkl|Mno|Pqr LIST_ORDERED <== 'Abc|Def|Ghi|Jkl|Mno|Pqr' LIST_CURRENT <== 'Def|Mno|Jkl|Abc' LIST_RESULT <== $regexp(
             <!--coloro:#800080--><span style="color:#800080"><!--/coloro-->$regexp<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->(<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->%LIST_ORDERED%<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc-->
             <!--coloro:#800080--><span style="color:#800080"><!--/coloro-->$regexp<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->(<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->%LIST_ORDERED%<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->(?>/b(<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->%LIST_CURRENT%<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->)/b)<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->)<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->)<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->\|+<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->|<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->)<!--colorc--></span><!--/colorc-->
LIST_RESULT = 'Abc|Def|Jkl|Mno|' ... or ... LIST_RESULT <== $regexp(
             <!--coloro:#800080--><span style="color:#800080"><!--/coloro-->$regexp<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->(<!--colorc--></span><!--/colorc-->
             <!--coloro:#800080--><span style="color:#800080"><!--/coloro-->$regexp<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->(<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->%LIST_ORDERED%<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc-->
             <!--coloro:#800080--><span style="color:#800080"><!--/coloro-->$regexp<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->(<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->%LIST_ORDERED%<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->(?>/b(<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->%LIST_CURRENT%<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->)/b)<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->)<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->)<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->\|+<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->|<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->)<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->\|$<!--colorc--></span><!--/colorc--><!--coloro:#008080--><span style="color:#008080"><!--/coloro-->'<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->,<!--colorc--></span><!--/colorc--><!--coloro:#000000--><span style="color:#000000"><!--/coloro-->)<!--colorc--></span><!--/colorc-->
LIST_RESULT = 'Abc|Def|Jkl|Mno'

DD.20150103.2113.CET, DD.20150626.1128.CEST

It's beautiful... :astonished: Now I have some helper tags that order the list, and then are removed at the end of the Action. Perfect! Thanks ever so much DetlevD :slight_smile:

Hopefully other users will be able to find this, although it's within a different thread (perhaps it needs to be split?). Really could be useful for those searching.

I would like to bump this suggestion. Bringing it back to the original idea of a 'clipboard to tag' function that works exactly like 'text file to tag'.

It would save a considerable amount of time not having to open notepad, save, name + select the text file every time.

I now use foobar's 'automatically fill values' function with the clipboard source to do this, and then open the files in mp3tag.
This costs about as much time as going the text file route, but it doesn't leave me with a useless text file.

It would be a nice time saver to be able to use the clipboard directly in mp3tag.

[Sorry; I've just submitted an answer to a wrong topic]

Do we have any update on this potential tremendous time saving feature that should be implemented on the already excellent Mp3tag?