Page 1 of 1

[Script] Generate custom Finder tags

Posted: 15 Oct 2024, 05:32
by rednoah
This post-processing script will generate custom macOS Finder tags:

Groovy: Select all

{ source, target ->
	// custom list of tags
	def tags = allOf{ y }{ hd }{ genre }

	// write plist to xattr
	target.xattr.'com.apple.metadata:_kMDItemUserTags' = XML{
		plist(version:'1.0') {
			array {
				tags.each{ string(it) }
			}
		}
	}
}
Screenshot