Create tags from an extern list

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

Moderator: Mr_Noodle

Create tags from an extern list Tue Feb 09, 2016 11:02 am • by Moeri
I tag a file with a word hazel found inside the file.
Therefore I have to write a lot of rules: one rule for one word.

is the following possible:

1. I got a file with the words I want hazel to use for tagging.
Perhaps an .txt or an .csv file

...
Ikea
Recipt
Bill
Movie

...

2. hazel uses every single word to look for a match in the file, and creates the tag from this Word.
3. If more than one Word matches, hazel should add more tags, accordingly.
4. If I write more words in my list, hazel should update the matching process with the new words.....etc...

Aim:
-fewer hazel rules
-a "word-list" I can expand to more words I need for tagging my files.

Is it possible to do so?

Greetings from Germany
Moeri
 
Posts: 11
Joined: Tue Feb 09, 2016 10:46 am

Re: Create tags from an extern list Tue Feb 09, 2016 1:11 pm • by Mr_Noodle
You'll need to use a script to do this. Most likely an AppleScript/JavaScript instead of a shell script since it gives you the ability to pass things back to Hazel.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Create tags from an extern list Tue Feb 09, 2016 1:15 pm • by Moeri
Thanks for the quick answer.
I´m not an programmer.
Can You help?
Moeri
 
Posts: 11
Joined: Tue Feb 09, 2016 10:46 am

Re: Create tags from an extern list Tue Feb 09, 2016 2:05 pm • by Mr_Noodle
I can't write the script for you as that's a bit beyond the help I can give. Maybe someone else here can help with the script or you may want to look into enlisting someone on a site dedicated to AppleScript.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Create tags from an extern list Wed Feb 10, 2016 3:52 pm • by Moeri
OK. Thanks.
Moeri
 
Posts: 11
Joined: Tue Feb 09, 2016 10:46 am


Return to Support