(macOS) Tag a folder with Finder after beets moves an album to it #3947
Unanswered
2V3EvG4LMJFdRe
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You should be able to use
You can create a wrapper shell script using this, and save it somewhere such as #!/bin/bash
your-tagging-command --add "$1" "$(dirname "$(dirname "$2")")" You can then run it from a hook: hook:
hooks:
- event: item_moved
command: '/Users/your-name/.config/beets/tag.sh Organized {destination}' You might need to hook:
hooks:
- event: item_moved
command: 'bash /Users/your-name/.config/beets/tag.sh Organized {destination}' |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want beets to add the Finder tag "Organized" to the artist folder an album is added to, after its import to the library.
From the terminal, I can use the following to tag a given file as "Organized" (not a native command, I installed this from somewhere):
$tag --add "Organized" "filepath"
Now I need a way to append this process to beets, and have beets provide
filepath
. The hook plugin offers a command after a beets event. I've found a beets event calleditem_moved
. Assuming an "item" is a song, then I need to reference the folder that song is moved to, go up one folder, and retrieve that path to the command above.here\album\item.moved
I'm not a programmer so this is all I've been able to figure out by myself. I'd appreciate any help. I'm publishing this as an idea because I think it could be useful to have a simpler workaround. Currently I have a folder with all files that haven't been tagged and another for those "Organized", but I think structurally we are moving to a point were using folders to make these type of divisions doesn't make as much sense as using tags.
Beta Was this translation helpful? Give feedback.
All reactions