This is a phenomenal script; thank you so much! I just wanted to mention that the gist has the debugging behavior of only pulling in recent posts, as opposed to all posts. It took me a few minutes to figure out why I was only seeing a handful of posts getting imported.
Jeff: Yeah, I have to clear this up. It’s down there in comment, but sure enough not obvious enough
bshapiro84: That’s an HTTP status code from Pocket saying something went wrong. What, why? No idea. The sheer number of posts shouldn’t be an issue, mostly because the update kicks on on the last one that got imported. I. e. even if you have to run the script a couple of times, it will import everything. Are you positive you entered the token correctly? What does the protocol say when the error appears?
The bug: In line 39, in the if-clause, the code tested whether theGroupComment was an empty string. Well, it had to be, all the time, every time, because it was just initialized as such.
The bug will not give you headache under normal circumstances, but in case your DB goes haywire this might lead the script to try and get ALL your Pinboard posts. It will not import them, because they are duplicates. Still, it will take ages to run. You can remedy the situation by manually setting the group’s comment to a RFC 3339 compliant datetime string, such as 2018-12-01T13:14:49Z. Anyways, I rather fix a bug than use a workaround, so here you go.
I set up a launchd script to run the import every day at 10pm. On completion, and on error, the script shows dialogs. Don’t want them when running on automatic, thus I introduced a flag that controls whether the dialogs appear or not. In turn, the flag is controlled by checking for a command line parameter.
After setting up the scheduled task I realized the script does not know which database to use. Wow. Ended up with all my +6k bookmarks in the global inbox
Hello, I tried the script and it worked very well in importing existing Pinboard bookmarks, and the new bookmarks after the the last import. However, I don’t think this works entirely at least in my workflow. If I manage the existing bookmarks in Pinboard, such as manage tags, delete redundant bookmarks and so on in Pinboard, it won’t reflect to an already imported database in DEVONthink, which means I’d need to do similar operations in DEVONthink if I wanted to manage the bookmark library. Do you think if it’s doable to update changes in already imported items from Pinboard (changes in tags, description, deletions, etc), or what’s the best way to do it with the Pinboard API? I could spend some time to script it if there’s a sensible way to do it. I figure Pinboard clients such as Sillo (MacOS) and Pinner (iOS) get this changes through Pinboard API. I see there’s the /v1/posts/updateto check when data has changed last time.
Hi itst! I kind of have an issue with having both personal, study and work related bookmarks, notes todos spread around multiple apps, to-read lists, inboxes, etc. Like forgetting where I put that data and having too many inboxes to process them all. So I’m trying to consolidate the system I have at hand.
Actually the last week I decided to move at my bookmarks from Pinboard to DEVONthink along with the notes, pdfs, etc I already have there. It’s with some rough edges, but it’s looking good so far. I actually thought I was using your script to download the bookmarks, but since I had installed DEVONthink 3, it was using some default Pinboard script instead. It didn’t import some important stuff such as the comments field. So, therefore I came back to this thread and used your great script, not to forget instructions, to download it all to DEVONthink. So thanks!
First off, thanks for your help. I double checked the details and everything was good. Just got home and decided to delete the script and start again and everything works
Have no idea if I accidentally deleted something from the script without noticing or something like that but it’s working now. Again thanks for your help, it’s awesome having Pinboard in Devonthink