Jump to content

Label Colour Tag — Edit file labels and tags


Recommended Posts

  • 2 months later...
[13:00:34.601] Logging Started...

[13:00:47.305] LabelColor[File Action] Processing complete

[13:00:47.313] LabelColor[File Action] Passing output '/Users/xxx/Downloads/Chrome/NFU_design_Anim_COMP_15_Sh006_v002.mov' to Arg and Vars

[13:00:47.315] LabelColor[Arg and Vars] Processing complete

[13:00:47.315] LabelColor[Arg and Vars] Passing output '' to Keyword

[13:00:52.466] LabelColor[Keyword] Processing complete

[13:00:52.469] LabelColor[Keyword] Passing output 'proje' to Split Arg

[13:00:52.470] LabelColor[Split Arg] Processing complete

[13:00:52.471] LabelColor[Split Arg] Passing output '(

    proje

)' to Join Args

[13:00:52.471] LabelColor[Join Args] Processing complete

[13:00:52.472] LabelColor[Join Args] Passing output 'proje' to Arg and Vars

[13:00:52.472] LabelColor[Arg and Vars] Processing complete

[13:00:52.473] LabelColor[Arg and Vars] Passing output '/Users/xxx/Downloads/Chrome/NFU_design_Anim_COMP_15_Sh006_v002.mov' to Split Arg

[13:00:52.474] LabelColor[Split Arg] Processing complete

[13:00:52.475] LabelColor[Split Arg] Passing output '(

    "/Users/xxx/Downloads/Chrome/NFU_design_Anim_COMP_15_Sh006_v002.mov"

)' to Automation Task

[13:00:52.476] ERROR: LabelColor[Automation Task] Task not found 'com.alfredapp.automation.core/files-and-folders/path.tags.add'

 

Oh is that last line the culprit?

 

Link to comment

a-ha! That did it thank you.

 

It's SO cool, but I think what I was hoping to achieve isn't possible due to the lack of "tag retrieval" ability like you said.

Great for creating new colourless tags on the fly, but I have a bunch of predefined global tags that I use religiously, and having to type out the keyword in full isn't the solution.  At the moment I either right-click on the file, click Tags..., type in the first couple letters and hit Enter, or I use the Tag button in the toolbar
 image.png.4dcc6b6afbf911a48aa173c7d2067d83.png

 

but it's a lot of mousing around

 

 

Edited by dterranova
Link to comment

oh wow, yes! amazing. Thanks

 

I just fed it a CSV which makes it even easier to manage. Works great!

 

Does the workflow stay updated according to any new changes to the CSV, or is it just a one-time import thing? (sorry, slightly off topic)

 

EDIT: Answered my own question by testing. Think I've found a solution to have a live CSV with this: fuzzylist by derickfay

 

EDIT 2: ok no I don't think fuzzylist does what I thought but I'll keep digging!

 

 

Edited by dterranova
Link to comment
  • vitor changed the title to Label Colour Tag — Edit file labels and tags
  • 1 month later...
8 hours ago, vitor said:

@paulmoons Scroll up to the previous conversation.

 

Apple does not provide an API to retrieve your custom tags, so if you want that to be supported, use the Feedback Assistant app to ask them to provide such a method. The more people do it, the likelier it is to be implemented.

 

Keep scrolling down from there to see an alternative.

 

Hello! Thank-you for your response. Firstly, I looked at that conversation but it doesn't make much sense to me. I'll try the suggestion in the post but I can't follow how it will do what I want. Secondly, you mention custom tags. What about standard ones. All I need is a colour really, the tag name is irrelevant for my purpose.

 

Edit: I tried editing the workflow following the instructions linked but I can't see any blue icon - unless I am missing something?

Edited by paulmoons
Link to comment
21 minutes ago, paulmoons said:

What about standard ones. All I need is a colour really, the tag name is irrelevant for my purpose.


Then I think you’re looking for the “label” part of the workflow. That shows the colours (see screenshot in instructions).

 

22 minutes ago, paulmoons said:

but I can't see any blue icon


Ah, that icon is now the green one (they’ve been recoloured recently).

Link to comment
5 minutes ago, vitor said:


Then I think you’re looking for the “label” part of the workflow. That shows the colours (see screenshot in instructions).

 


Ah, that icon is now the green one (they’ve been recoloured recently).

 

Thank you but I think you may have misunderstood what I am trying to achieve? See screenshot attached. All I want to do is be able to view the labels (coloured dot) in the result list - preferably by default. Not search via label or list labels or edit labels.

1205952900_IMG_3146Large.jpeg.e9fa181ebe5e8ef43ea856d3b2840935.jpeg

Link to comment
  • 4 weeks later...
On 10/24/2022 at 6:57 PM, vitor said:
On 10/24/2022 at 6:42 PM, dterranova said:

should they be coming up as suggestions when I start typing?

 

There’s no macOS API to retrieve all your custom tags.

 

 

While this is true, I think I still found a decent way to make autosuggest happen using the mdfind and mdls commands.

 

mdfind -onlyin ~/PATH/TO/SOURCE "kMDItemUserTags=PREFIX*"
mdls -name kMDItemUserTags "$FILE_PATH"

 

@vitor I am uploading a version of your workflow where I have been playing with this concept. I'm sure I haven't tested all possible scenarios and a lot could be improved with caching, but it works pretty well so far 🤗

 

https://bashupload.com/0_G9I/uzu8e.alfredworkflow

Edited by zeitlings
Link to comment
  • 8 months later...
  • 3 weeks later...

Hi,

Unfortunately, the  "Add Tags..." command does not work for me.

 

Steps to reproduce:
• Select file "Test.pdf" in Finder
• Hit shortcut key for Alfred Universal Action (⌘U for me)

• Select "Add Tags..." option and hit Enter

• Type tag name "Example" and hit Enter

 

Expected behaviour:
• See the "Example" tag added to the "Test.pdf" file

Actual behaviour:
• Nothing appears in the tags field in Finder (I also checked: "Right clic > Get Info", nothing as well)

Log:

Quote

[15:30:37.406] Logging Started...
[15:30:41.778] Label Colour Tag[File Action] Processing complete
[15:30:41.781] Label Colour Tag[File Action] Passing output '/Users/Flavien/Desktop/Test.pdf' to Arg and Vars
[15:30:41.783] Label Colour Tag[Arg and Vars] Processing complete
[15:30:41.783] Label Colour Tag[Arg and Vars] Passing output '' to Keyword
[15:30:45.224] Label Colour Tag[Keyword] Processing complete
[15:30:45.228] Label Colour Tag[Keyword] Passing output 'Example' to Split Arg
[15:30:45.229] Label Colour Tag[Split Arg] Processing complete
[15:30:45.230] Label Colour Tag[Split Arg] Passing output '(
    Example
)' to Join Args
[15:30:45.231] Label Colour Tag[Join Args] Processing complete
[15:30:45.231] Label Colour Tag[Join Args] Passing output 'Example' to Arg and Vars
[15:30:45.232] Label Colour Tag[Arg and Vars] Processing complete
[15:30:45.233] Label Colour Tag[Arg and Vars] Passing output '/Users/Flavien/Desktop/Test.pdf' to Split Arg
[15:30:45.233] Label Colour Tag[Split Arg] Processing complete
[15:30:45.234] Label Colour Tag[Split Arg] Passing output '(
    "/Users/Flavien/Desktop/Test.pdf"
)' to Automation Task
[15:30:45.235] ERROR: Label Colour Tag[Automation Task] Task user configuration not valid '(
    "Text Area 'Tags' is required"
)'
[15:30:50.686] Logging Stopped.

 

Link to comment
  • 4 months later...

Any way we can get the list of tags already available on macOS and show them in the list filter in "edit label" or "add label"?

 

EDIT: nvm, I see it's not possible based on Vitor's response. Will add tags manually to the list filter🙁 

Edited by andy4222
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...