Converting OSX Finder Tags to Evernote Tags with AppleScript
Tags:
Bottom Line: Here’s a quick and dirty AppleScript to import files to Evernote and preserve their OS X Finder tags.
Several years ago I posted this AppleScript for importing OpenMeta-tagged files to Evernote with Hazel. It’s not been particularly popular, which just over 1,000 unique pageviews since posted in 2012, but hopefully it’s been helpful to some.
At the time, I had been using an app called Leap to add OpenMeta tags to files. Apple gave Finder the ability to tag files with Mavericks in 2013, which changed things considerably — no longer do people need to use a 3rd party app to tag files in Finder. However, by that time I’d already migrated to Evernote, so I didn’t pay too much attention.
However, a few days ago, I got a request for help in adapting my prior AppleScript to convert Finder tags to Evernote tags. At first I thought it was going to be fairly complicated, but I ended up getting it figured out with not much effort, so I thought I’d publish it in a new post.
Once again, it’s intended for use with Hazel, which can monitor a folder and will pass in files individually as theFile
. You could probably just have a Hazel rule for tags
-> is not blank
.
I put in a few lines for debugging and testing in Script Editor.app
to make sure it seems to be working, most importantly line 2, where you can put in the path to a test file (that has Finder tags) and see that it gets imported into Evernote appropriately.
I hardly know any Ruby, so please excuse how sloppy that part came out, and feel free to recommend improvements in the comment section below.