Last active
May 19, 2017 00:39
-
-
Save zholmquist/7715258 to your computer and use it in GitHub Desktop.
Hazel Embedded AppleScript that logs filename to Evernote.
I use this in a script that cleans up my Desktop and Downloads and files everything away.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Evernote" | |
tell application "Finder" to set file_name to (name of theFile) | |
set time_string to do shell script "date '+%H:%M:%S'" | |
set date_string to do shell script "date '+%Y-%m-%d'" | |
set message to "<p><b>" & time_string & "</b> | Moved <em>" & file_name & "</em></p>" | |
set matches to find notes date_string & " notebook:Log" | |
if (count of matches) is 1 then | |
set the_note to item 1 of matches | |
append the_note html message | |
else | |
create note with html message title date_string notebook "Log" | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment