Enrich your tiddlers with bookmarks from your Pinboard account.
Bookmarks from your Pinboard account...
...are included in tiddlers that share the same tags.
- This plugin is a work in progress, it is not yet
1.0
. - This plugin only works with the Node.js version of TiddlyWiki5.
- There is a fork of the TiddlyWiki5 repo with a modified readme to walk you through setting up a TiddlyWiki server.
- The Pinboard bookmarks are only retrieved on server startup as there are not currently any easy hooks to perform this action with TiddlyWiki's plugin system. However the fork linked above contains a script and instructions for setting up a cron job to restart the TiddlyWiki server, effectively providing regular updates to the bookmark tiddlers.
git clone https://github.com/Jermolene/TiddlyWiki5.git
cd TiddlyWiki5/plugins
git clone https://github.com/moderatemisbehaviour/TW5-get-pinboard-bookmarks.git
- Go to the password section of your Pinboard's account setting page.
- Copy the full API token including the username.
- Create a
pinboard_api_token
envrionment variable.
Type setx
pinboard_api_token
your_api_token
into a command prompt. The environment variable will only be available in future instances of command prompt.
Then there are a variety of ways you might create a persistent environment variable. StackOverflow has the answers.
- Navigate back to the root directory of the TiddlyWiki5 repository.
node tiddlywiki your-wiki --init server
{
...,
"plugins": [
...,
"tiddlywiki/markdown",
"TW5-get-pinboard-bookmarks"
],
...,
}
- From the root of the TiddlyWiki5 repository run:
node tiddlywiki your-wiki --server
- Open your browser and go to
http://localhost:8080
.
Call the get-pinboard-bookmarks
macro in tiddlers that you would like enriching with Pinboard bookmarks.
Add <<get-pinboard-bookmarks>>
to the body of a tiddler that has tags which also appear on your Pinboard bookmarks.
On startup the plugin retrieves all your bookmarks from the Pinboard API using
the posts/all
method. It asynchronously processes the JSON response and writes a new tiddler for each bookmark.
These 'bookmark tiddlers' have the following characteristics:
- They are saved in a
.tid
file with the naming conventionpinboard_Bookmark_Title
(the intention was that they be saved intiddlers/pinboard
but that is not possible until this pull request is merged on the TiddlyWiki5 repository). - They are tagged with
$:/tags/Pinboard
. - They have a url field that contains the URL of the original bookmark.
- They have a type field set to
text/x-markdown
which means their content is parsed as Markdown.
- Normalise Pinboard tags by replacing spaces with hyphens and capitalising words, allowing 'tag tiddlers' to have well formed titles.
- Make Markdown parsing and tag normalisation optional via configuration.
- Create Get Started instructions as well as readme and usage information in plugin section of Control Panel.
- Add a system tiddler that summarises all bookmark tiddlers and provides buttons to delete all and resync.