Topic: https://brettterpstra.com/2010/03/06/saving-safari-browsing-sessions-to-evernote/
hide preview

What's next? verify your email address for reply notifications!

Jason Clarke 14y, 349d ago

I know this is more of a Mac OS X support request, but when I go to save the script into the Library / Scripts / Applications / Safari folder, it says I don't have permission. Viewing the Safari folder using Get Info shows that "system" has Read & Write access, and "everyone" has Read only. Since I'm not system, it doesn't appear that I can change this. Any thoughts on how to proceed?

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 14y, 349d ago

Are you saving to the Library/Scripts... in your user folder, or in the root? You should be in /Users/[yourusername]/Library/Scripts/Applications/Safari. Let me know if that does the trick or not!

remark link parent
hide preview

What's next? verify your email address for reply notifications!

Jason Clarke 14y, 349d ago

I'm trying to save in my user folder; that full path doesn't exist under the drive root's Library.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

ttscoff 14y, 349d ago

But it does exist in your User folder, right? That's really odd. It should be owned by youruser/staff, and you should be able to trash and replace it if needed. If there's nothing else in that folder (or if you've backed up the contents), go to Terminal, cd to the Scripts/Applications folder and run sudo rm -rf Safari, entering your user password when prompted (assuming your user has admin privileges). Then you should be able to make a new Safari folder with proper permissions ... ?

remark link parent

load more (2 remarks)
hide preview

What's next? verify your email address for reply notifications!

ttscoff 14y, 348d ago

This threading kind of sucks… I may have to find a better system for comments :).

Once you check the box in AppleScript Editor, it should always show up, not just in certain applications. The Script menu item over on the right of the menubar should have Application-specific scripts for the current app at the top.

You could always get FastScripts, too :).

hide preview

What's next? verify your email address for reply notifications!

Jason Clarke 14y, 349d ago

Thanks! The problem went all the way up to the Scripts directory, but luckily there was nothing important in there, so I blew them all away and recreated them.

I'm like the worst commenter ever.... Now I'm having trouble getting the AppleScript menu to show up in the menu bar of Safari. The box is checked to show it in AppleScript Editor's General tab in Preferences (Show Script menu in menu bar), but it's just not showing up in Safari.

hide preview

What's next? verify your email address for reply notifications!

Keizo 15y, 18h ago

It is really nice script. I think it is better has a Growl feature that tell me about get bookmarks to Evernote.

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 15y, 17h ago

Hey Keizo!

You can add that pretty easily if you have growlhelper installed. I can't remember if that's part of the default install of Growl or not. I'll post code for that later, if you want to test it out.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

Keizo 15y, 15h ago

I believe I have install Growlhelper though I don't know where is it. Anyway I really want to try the code please.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

ttscoff 15y, 14h ago

You should be able to triple-click the code line in the reply above and select it all, even though it's not fully visible.

remark link parent

load more (1 remarks)
hide preview

What's next? verify your email address for reply notifications!

Keizo 15y, 9h ago

Thanks Brett.

It looked like hard for me. Actuary I confused little bit, however I finally did it. The script displayed Growl notification like "Bookmark saved to Evernote".

hide preview

What's next? verify your email address for reply notifications!

ttscoff 15y, 14h ago

My mistake, the program is growlnotify, and it's in the main Growl download, just in case you don't have it. It requires a separate install by running the install.sh script from Terminal. In an AppleScript, you can call it like this:

do shell script "/usr/local/bin/growlnotify -m 'Bookmarks saved to Evernote' -t 'EverSave' -i 'Evernote'"

and insert that line wherever you want to send a notification, editing the Saved to Evernote part to fit the message you want to send. I'll eventually rework the script to include this, but it's necessary to check that growlnotify is installed before calling it or it will throw errors. For now, I'll leave it up to the user to check if they have the utility installed and add the line(s) manually.

hide preview

What's next? verify your email address for reply notifications!

Mike R 15y, 13d ago

Just for the record, this script runs so quickly and silently that at first I didn't think it was working -- also I forgot that it targets the 'Bookmarks' notebook. Nice work Brett!

If you're using the WebKit nightlies, you can change the application title in the script to "WebKit" -- however it still goes in the Safari scripts folder.

hide preview

What's next? verify your email address for reply notifications!

Justin 15y, 15d ago

Both your script and your walk-through are real gifts to your fellow AppleScripters..... much obliged to you for both (and for the "shout out")!

Not to be self-deprecating, but I think your script is an improvement upon my own... and here's why: As great as Evernote is, one of the seemingly universal complaints about it is how it handles simple text formatting. Based upon some stuff I read on their forum, my guess is that the situation won't really improve until Evernote finishes revamping the DTD used in creating notes.

So, the fact that you are using some Script-fu to "pretty up" the data into HTML is actually an important difference -- certainly more than a cosmetic one. I think it really opens the door to making more readable notes right now... and also shines a light on a way that people will want to script for Evernote going forward!

Solutions like yours take the guess-work out of how Evernote will format your data. This is the direction I've been moving in with my own scripts (stay tuned for some fun revisions on that front).

All of which is to say -- I am very glad you didn't see mine first! ;)

Nice work, Brett!

hide preview

What's next? verify your email address for reply notifications!