Welcome Guest

Pages: 1
Action Question
CarlinSmithPostJune 1, 2024, 18:22
Beginner
Posts: 29
Registered:
January 1, 2020, 15:15
Normal topicAction Question

I am sure this can be easily accomplished just not sure which actions to put together. I want to create an export of all User Defined Text Names. I essentially want to explore the various extra metadata that may be in the files. I don't even really need the mapping to the files just a complete list.

2MR2PostJune 2, 2024, 01:45
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicAction Question

Well .... if that's what you want it's easy. However, extra metadata can come in many forms. User Defined Text Items, User Defined URLs, UFIDs, GEOBs, etc. There are many buckets.

I'm taking the word export literally. You can select a bunch of files and do a View>View as Text. This will give you a single view of each file's metadata as text, in the Log Viewer. The view can be saved. This will have everything. UDTIs will be grouped under a single heading.

The Multi Item Field List Enumerator statement can produce a list of names for any of the multiple item tag types (such as UDTIs). You can then enumerate the list and get the associated data.

1) Set named variable 'UDTIs' to an enumerator list for User Defined Text Info items
2) Sort the list in named variable 'UDTIs' delimiter "\n" as in Finder

#1 is a Multi Item Field List Enumerator statement. #2 is a Sort List statement.

The above above will give you a sorted list (\n delimited) across all selected files.

If you want me to produce the action let me know the answers to the questions: Do you want the information saved per file or in a single file? Do you only want the names and their associated data ... or only the names?

CarlinSmithPostJune 2, 2024, 12:10
Beginner
Posts: 29
Registered:
January 1, 2020, 15:15
Normal topicAction Question

Hi thanks for quick reply. I tried creating the action above but thus far not getting desired results.

I would like a single file from a batch processing action and the UDTI name and data.

2MR2PostJune 2, 2024, 13:54
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicAction Question

Download the action at:

https://2manyrobots.com/actions/Produce-UDTI-List.zip

The action is called Produce UDTI List

The action can be run on loaded files or through the batch processor. It produces a file at: ~/Documents/Yate/UDTI List.txt

Files with no UDTIs are not listed. If you want all files to be listed, disable line 13 which is a conditional Exit.

Each UDTI is displayed as:

UDTI (name) = ❮data

The format was chosen as the names might contain leading or trailing spaces and the data can contain newline or ( ) characters. The name and data are enclosed as it becomes difficult to determine what is what without doing it.

Let me know how it goes.

CarlinSmithPostJune 3, 2024, 12:05
Beginner
Posts: 29
Registered:
January 1, 2020, 15:15
Normal topicAction Question

Thanks for writing this. I was able to use it (and learn) and then created a copy and tweaked it slightly as was running this batch across ~140K files. My goal was to have a view of all UDTIs (value and data) across all those files. I have written other Yate scripts to remove things if I found something I didn't want but I didn't have a comprehensive view of what was in the files.

I used an external editor (Visual Studio Code) to look through the resultant files. I am curious could Yate produce a list of unique pairs (throwing out duplicates)? I place my own UDTIs to better track certain collections and groupings so there are thousands of duplicates I scrolled through looking for anything unique.

Also want to say appreciate the support you have always given.

2MR2PostJune 3, 2024, 12:24
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicAction Question

I can produce one to list all unique name-data pairs. However, I'll remove the file information as it becomes meaningless if duplicates are are eliminated. I'll change the name of the action so you can always run the original to locate items. More than likely tomorrow.

CarlinSmithPostJune 3, 2024, 12:37
Beginner
Posts: 29
Registered:
January 1, 2020, 15:15
Normal topicAction Question

That would be great and I am sure will further my learning of Yate. When I altered the action provided I also removed the file information and the additional new lines to make it as compact as possible.

2MR2PostJune 3, 2024, 15:06
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicAction Question

Download: https://2manyrobots.com/actions/Produce-Unique-UDTI-List.zip

This one is called: Produce Unique UDTI List

The log is now at: ~/Documents/Yate/Unique UDTI List.txt

CarlinSmithPostJune 3, 2024, 19:21
Beginner
Posts: 29
Registered:
January 1, 2020, 15:15
Normal topicAction Question

Worked precisely as I described - thanks for quick response!

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