Based on Christians, Andreas’ and Rafaels earlier work, I worked on a Pinboard import script.
It had to be able to initially import my +5k bookmarks from Pinboard and keep them updated.
- Uses Pinboard Auth Token instead of login credentials
- Imports all your Pinboard bookmarks
- Preserves timestamp of the most current post for update run
- Supports “Decluttering” from the Web Clipper via heckyesmarkdown.com or instaper.com …
- … plus five more import strategies
- Implements PDF fallback in case Decluttering seems to fail
- Handles links to document files and binaries
- Progress bar
- macOS style group icon
- Basic logging system
So far, it works for me.
If you use Pinboard, give it a go and tell me that you think.
@Christian, or everyone else at DT: If you want to use/publish it, feel free to do so.
gist.github.com/itst/780dee5c51 … c39166eb0f
Wow… quite a project. Thanks for sharing. I hope it can be of some use to Pinboard Users here.
Right after posting the message above and on my way to bed, I realized the import & update mechanism can easily be made more reliable.
Pinboard returns items in reverse chronological order, from current to oldest. Naivly I went ahead and did what you usually always do: process the data as it comes.
Instead, it would be beneficial to import the data backwards, starting with the last element and work your way up to the first.
I will start to implement this now.
gist.github.com/itst/780dee5c51 … c39166eb0f
This should be faster and more robost in case strange things happen.
Beware: heckyesmarkdown.com (as well as Brett’s other sites ) seems to be offline for now. Use Instapaper instead.
Thanks for the follow up.
Just wanted to break my long streak of lurking on this forum in silence by thanking you for putting this together. I was recently playing with the default PinBoard script to no avail. This is really great and I appreciate you sharing it. Thanks.
You’re the first to let me know it actually works. Yay!
Glad it’s of use to anyone other than me
I’m really excited for this but I can’t get it to work (note: probably user error). Do I just install it in the scripts directory, or is there something else I need to do? I tried inputting my token to the script but then it won’t save.
Do you generally know your way around with AppleScripts?
- Open Script Editor.
- Copy & paste the code from the gist (linked above) into Script Editor.
- Copy & paste your Pinboard API Token.
- Save. When asked for location, navigate to ~/Library/Application Support/DEVONthink Pro 2/Scripts
(Or, in DevonThink, find the Script menu, click on Open Script Folder and the folder from there into Script Editor’s save dialog.
- Choose a subfolder and name the script. I placed my copy in the Import subfolder.
- Return the DevonThink, open the Script Folder, choose the subfolder from step 4 and click on the script name.
Let me know if anything goes wrong.
I cannot figure it out, but I’m completely ignorant with scripting. This is the error:
tell application “DEVONthink Pro”
get record at “/Pinboard”
–> missing value
error “Can’t make «class DTco» of missing value into type text.” number -1700 from «class DTco» of missing value to text.
I put the API in, is there anything else I have to enter in the script?
No, the API key is all you need to enter.
Please, create a group named “Pinboard” in the database you want to use.
Then run the script again.
(Maybe I made an error when implementing the error checking …)
Sorry and thanks
@itst, adding the Pinboard group worked! Thank you!
So excited to use this.
Cool! I’m sorry it took you so long to get this running. I’ll look into that soon as possible.
Hopefully the script works well enough for you!
I updated the script, so that it can be run without the ‘Pinboard’ group present.
Thank you arielgreen for reporting this bug!
Ariel, did you change the URL in line 64?
See gist.github.com/itst/780dee5c51 … d-scpt-L64
This is important to actually import all you Pinboard bookmarks.
Thank you for this! I’m trying to get this to work. I’m getting errors in script editor when I try to edit the script and add my pinboard API. It says syntax error on the return the adjusted as string. Any ideas?
Can you please post a screenshot of Script Editor showing the error message?
itst > I uploaded a screenshot. Thanks for your help
I’m having two issues with this script.
When I have the Pinboard group in a database, it seems as though it never recognizes it and downloads all of the pinboard pages (web documents) to the root of the database (not in any folder). The log also states that it did not find the group. However, the spotlight comments in the group do update depending on what the most recent downloaded page was.
At some point it freezes up for a large download. This may just be my machine however.
Thanks, not sure if you need more info or if this is happening to others???