I normally collect a lot of text fragments from the web as reference material for future articles or research, and I find that the most popular services and apps sometimes are too complex for such a “plain” task. I don’t want images nor fancy styles nor embedded tweets. Just plain text to quote or read later.
I also spend a lot of time in the Notes app, since I value the seamless synchronization between my devices that it offers.
So I’ve made a really simple Applescript (I’m not in any way an expert or a developer) that gets the current Safari tab Name and URL and then combines them with the clipboard contents to create a new note that includes the three strings.
The idea is that you select the fragments that you want to capture in Safari, then copy it to the clipboard and then the Applescript (that includes a little bit of HTML to make the link functional) creates the new note with all that information embedded.
Through Keyboard Maestro, you can automate this to occur with just one hotkey trigger.
Here is the Macro, I believe that’s pretty self-explanatory:
And here is the Applescript:
tell application "Safari"
set tabname to get name of current tab of window 1
set taburl to get URL of current tab of window 1
end tell
tell application "Notes"
make new note in folder "Quotes" with properties {name:tabname, body:"<html><br/><p>" & (the clipboard) & "</p><br/><a href=\"" & taburl & "\">" & taburl & "</a></html>"}
end tell
I would love to stylize the title in order to make it more visible, but it seems that it’s a term that doesn’t support HTML and CSS.