Welcome Guest

Pages: 1
Exporting and Importing Tags
royaljerryPostAugust 3, 2023, 16:50
Newbie
Posts: 3
Registered:
August 3, 2023, 20:26
Normal topicExporting and Importing Tags

I may be a newbie, but I cannot find, how I can simply export tags – e.g. Artists – to a text file or to the clipboard.

What I have tried so far:

I have created a system variable in Settings naming it to VARIABLE_1

I have created an action with the following steps:

    Copy the Artist field to named variable 'VARIABLE_1'
    Copy named variable 'VARIABLE_1' to the clipboard

Then I have selected all files, ran the action, then I checked my clipboard, and, well, it was empty.

Since the export did not work, I did not try importing tags from a file, but I am curious, how it could work.

Yate Version 6.16.1 (11575.11562) [ARM64] (R), MacOS Ventura 13.3.1 (a) (22E772610a)

2MR2PostAugust 3, 2023, 17:19
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicExporting and Importing Tags

You're mixing up named variables and track variables ... and you're ignoring the parallelism of Yate actions.

You're copying every artist field to the same named variable which can only hold one thing a time. If you really wanted each Artist in a variable you would use a track variable as follows:

Copy the Artist field to Variable 1

However this will not work for what you want as the Copy to Clipboard statement is documented as running only once, regardless as to how many files are selected.

This will work:

Build List with delimiter "\n" in named variable 'artists' from field Artist (As found) string delimiter "\~"
Copy named variable 'artists' to the clipboard

The first statement builds a list of artists delimited by a newline character (\n). The source is the Artist field of all selected files. The second delimiter is not used as you are not breaking down each individual Artist field. The resultant text is saved to named variable 'artists'.

The second statement copies the named variable 'artists' to the clipboard.

I've uploaded the snippet to: https://2manyrobots.com/actions/Copy-artists-to-the-clipboard.zip

As far as importing tags from a text file there is a text importer available on the resources web page named Generic Text Importer. Basically you use a File to Tag template to describe the layout of the file ... which can be one or more lines of text per file.

There are a few Yate scripting concepts that you have to get your head around. I strongly recommend reading Yate and the P Word which is a document available on the resources web page in the Documentation section.

royaljerryPostAugust 3, 2023, 18:17
Newbie
Posts: 3
Registered:
August 3, 2023, 20:26
Normal topicExporting and Importing Tags

Thannks a lot. I will try it tomorrow evening (2023/08/04 CET)

royaljerryPostAugust 8, 2023, 13:34
Newbie
Posts: 3
Registered:
August 3, 2023, 20:26
Normal topicExporting and Importing Tags

2MR2: both work perfectly. The copy action, and the import idea. Thanks a lot.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.015 seconds.