Open in TheBrain

Import Pinboard Bookmarks

<p>If you use the Pinboard bookmarking site, you can export all your links to XML. Using this file, you can run a regex find and replace to modify it to TheBrain outline format and then rename the text file and import into your brain.</p>

<p>

Here's what you need:</p>

<ul>

<li>A Pinboard Account</li>

<li>A decent text editor capable of RegEx Find and Replace (I use Sublime Text)</li>

<li>A sense of adventure</li>

</ul>

<p>&nbsp;

To export your bookmarks, go to &nbsp;http://www.pinboard.in/export &nbsp;and choose XML.

This will export all your bookmarks. Now open the file in your text editor of choice.

Choose Find and Replace and you generally will have to enable RegEx.</p>

<p>

Here's the syntax I use. Note that Sublime Text uses Boost Syntax. Others may have slightly different formatting.</p>

<p>

<b>Find</b>:

<post href="([].)" time=[]. description="([].)" extended="([].)" tag=[].*</p>

<p>

<b>Replace</b>:

$2

&nbsp;&nbsp;$1

&nbsp;&nbsp;-$3</p>

<p>

Please note my RegEx skills are poor. I'm sure there is a vastly better way to do this. If you have one, please feel free to scoff at my measly attempt and post your better version.</p>

<p>

This expression should replace the majority of your text into an outline format you can import into TheBrain. I've noticed some text with certain notes are not modified by the expression. I also noticed that if notes have line breaks, that will cause issues also. I'm sure there is a way to modify the expression to fix it, however I haven't invested the time yet.</p>

<p>

I wouldn't recommend importing all the bookmarks at once. For one, TheBrain can't handle anything over approximately 500 at a time. I would also recommend that you use File > Import Text Outline. I've found that if you copy and paste it will miss thoughts, even if you do less than 500. You will have to rename the export file from .xml to .txt for TheBrain to see the file.</p>

<p>

Once this is done, TheBrain will take a while to import the favicons and index the sites.</p>

Attachments