Dynamic Tags out of a list

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Dynamic Tags out of a list Tue Jan 16, 2018 11:55 am • by mcquinn
Hi, I'm working on a rule that matches the current tags a file has to a text file with specific keywords.

The idea is to append all the tags not listed in this text file to the filename, delete them and only keep the ones that match the keywords in the text file.

I've been able to work out most of this except the final bit "keeping the ones that match the keywords"

The current implementation works something like this

>read the tags
>compare them with the text file using applescript and return the keywords that were matched as a list
>delete all tags
>re-add the tags from the list

the bolded part is where I'm stumped

I've tried to just make a dynamic tag using the list as a custom attribute but that just gives me huge concatenated tag instead of individual ones. Is there some way to set this up that doesn't require a long hardcoded list of dynamic tags?
mcquinn
 
Posts: 2
Joined: Tue Jan 16, 2018 11:30 am

Re: Dynamic Tags out of a list Wed Jan 17, 2018 12:04 pm • by Mr_Noodle
Unfortunately, there's not good way to pass around lists. I'm thinking of ways of somehow doing that but haven't worked that out yet. For now, that will have to be done in a script.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Dynamic Tags out of a list Wed Jan 17, 2018 2:57 pm • by mcquinn
Thank you. I'll look into some script based approaches then.
mcquinn
 
Posts: 2
Joined: Tue Jan 16, 2018 11:30 am


Return to Support