Import Pinboard Bookmarks to DEVONthink Pro


I just modified Christian’s Delicious Import script to support Pinboard.

You can find the instructions and script at (or a German description at

I hope this is useful for someone.

Thanks for the script! As far as I know, delicious is going to be sold but won’t shut down. See … cious.html

However, it’s always a good idea not to trust or rely on cloud computing. Because clouds tend to disappear, don’t they? :wink:

Many thanks for writing this useful script! I also recently switched to pinboard and look forward to trying it.

Is this script (v 0.3) working for you? I get nothing but “Download failed” and “Import has finished” messages. What could I be doing wrong?

What software versions do you have? I tested the script today on OS X Lion 10.7.2 with DTPO 2.2.1 and the script works just fine.

Could it be that you entered the wrong username/password? Keychain Scripting is definitely broken under Lion.

I use SL 10.6.8 with DTPO 2.2.1 and I’m sure that I use correct login and password. In my password I use special characters - could this be a problem? Or should I maybe allow access to some other application in Keychain Access for entry? Right now there are few applications on this list and one of them is DT Pro Office.

Yes, you could try a password with alphanumeric characters only.

“Yes, you could try a password with alphanumeric characters only.”

I guess I could have done that before asking here… :blush:
Unfortunately this is not the problem.

Since I get “Download failed.” message, I guess the problem is in this part of the code:

set theXML to download markup from "" user pUser password pPassword encoding "UTF-8"
		if theXML is missing value or theXML is "" then
			error "Download failed."

but when I try to access via browser, after few seconds I can see:

where ellipsis replaces bunch of entries.

The other question I have concerns the first part of the script. If I get it correctly, script should look for the

first Internet key of current keychain whose name contains "pinboard""

and use its login and password values in case that no user input is given. I do have “Internet password” (“Internet key”?) keychain entry named “”, but it just keeps popping out the input window when I don’t enter anything.

Thanks for bearing with me so far.

This looks like an authentication problem.

What do you see when you open the script in the AppleScript Editor and add a line to print the theXML value?

I would also try to set the password and username in the script in the line you mentioned above to check if you can get at least a working connection with your credentials.


It doesn’t work.

I also printed out pUser and pPassword values after the input is done and they are well defined.

What kinda works though, is deleting a part of:

set theXML to download markup from "" user pUser password pPassword encoding "UTF-8"

so that I get:

set theXML to download markup from ""

This way I got 480 out of 2221 entries from Pinboard before the script stopped.

Mind boggling. :open_mouth: :confused: :unamused:

That’s really very interesting. I would assume that this is either AppleScript failing to handle the result properly or that the Pinboard API has some encoding / formatting issues. It’s hard to debug for me, because with my account everything works fine.

After trying again with the same script it won’t work again, but it behaves as if it’s importing. :neutral_face:

Would you consider to look into it a little bit more if I give you login info for my Pinboard account?

In either case, thank you for helping me so far.

I don’t know if I can help, but let’s take this off-list. You can reach me via email, just visit

The domain is but with a o instead of 0. The stupid forum filter thinks that I’m a pervert.

Yes, the forum filter is a bit Puritanical.

I frequently mention that I use (and praise) a certain utility whose name begins with “C” and ends with “l”. But if I spell its name correctly, the forum filter changes the name to “thingy”. :slight_smile:

BTW, I’m in love with the Purge command in C0cktail to free up and optimize RAM. By helping to avoid heavy use of Virtual Memory swap files, which results in slowing processing, it makes my laptop seem to have extra installed RAM.

There’s an old saying: RAM is good, more RAM is better. But when it’s not possible to add more RAM (my MacBook Air is maxed out with 4 GB RAM), that Purge command can help keep the computer from displaying spinning balls. I’ve adopted a routine for monitoring available free RAM, shutting down Safari when free RAM drops below a few hundred MB, and invoking Purge. Presto! I’ve got lots of free physical RAM and can launch Safari again - and DEVONthink Pro Office continues to run at top speed.

FWIW in the absence of a dedicated utility, one can open, enter the Bash command purge, and wait a little while for the cache to be flushed and emptied.

Or, of course, from a keyboard assignment,

do shell script "purge"

Note that it may take 15-30 seconds for the system to become responsive again …

That gets a little bit off-topic, but it’s nice to know another new shell command. Shouldn’t purge under normal circumstances make everything slower until the running processes build up their caches again?

Hey, has anybody, perchance, had a chance to update this to run with Lion? I’m trying, but having no luck with it. But I’m a scripting knucklehead.


It works here on Lion, there is only one known issue with the keychain so that you have to re-enter your password on each run.