I use both Pinboard & TiddlyWiki as places to store knowledge. Pinboard is a simple bookmarking service that stores URLs with tags and optional associated plain text notes.
I've decided to write a plugin that will read the tags of my tiddlers and call the Pinboard API to enrich them with links and text from bookmarks in Pinboard that have the same tags. However my web development knowledge is not that good and I've quickly run into problems. Here's what I've tried so far:
- Using Single-file TiddlyWiki
- Javascript Macro
- Call API using XMLHttpRequest().
- CORS error. Pinboard does not return Access-Control-Allow-Origin headers.
- Retrieve Pinboard feed using JSONP.
- Script tag is disabled in TiddlyWiki so cannot use JSONP.
- Using Node Server TiddlyWiki
- Javascript Macro
- Call API using XMLHttpRequest().
- XMLHttpRequest() is not defined error. Provided by browser.
At this point I decided I did not know enough and should seek advice. I could probably just modify some JS in the TiddlyWiki core to intervene as the tiddler is loaded but then the functionality will not be easily reusable. I could perhaps write a Chrome extension that can bypass CORS restrictions but that limits reusability too.
I'd really appreciate any pointers or advice, is there a way to do this using TiddlyWiki's plugin mechanism?