[TW5] Moving Bookmarks from the Browser to TiddlyWiki: Smallest Format of Tiddler Store?

876 views
Skip to first unread message

Scott Simmons (Secret-HQ)

unread,
Feb 7, 2016, 2:42:42 AM2/7/16
to TiddlyWiki
My favorite browser is undergoing some renovations that leave it struggling to manage my massive collection of bookmarks from the last 20 years.  That makes me think this could be a good time to experiment with managing bookmarks in a TiddlyWiki rather than through the browser.

I can export my bookmarks to an HTML file, which I should then be able to carve up into "proto-tiddlers" for import into TiddlyWiki.

The question is:  What's the best format for a file filled with ~6,000 "proto-tiddlers"?  I don't want to generate 6,000 individual .tid files, and .multitids don't seem right for what I'm doing.  Do I need to wrap individual tiddlers in the core code in order to make my makeshift HTML file importable?

Could I just generate an HTML file with ~6,000 lines of:

<html>
<div tags="..." title="..." field="..." />
<div tags="..." title="..." field="..." />
<div tags="..." title="..." field="..." />
etc.
etc.
</html>

... if I'm not planning on having tiddler body text in the bookmarks I import?

There's probably an easier, obvious formatting style I'm overlooking.  Any done anything like this and learned anything useful?

Hegart Dmishiv

unread,
Feb 7, 2016, 2:49:42 AM2/7/16
to tiddl...@googlegroups.com
Hi Scott,

We've just done this exercise on the {{DesignWrite}} course, converting CSV to JSON and bulk importing tiddlers like that. Have a look at my exercise tiddler, and the link to the courseware.

Hegart.

BJ

unread,
Feb 7, 2016, 8:05:25 AM2/7/16
to TiddlyWiki
HI Scott,
ff lets you backup your bookmarks as json - from this you could write some js to extract the bookmarks to tiddlers, but how are you going to organise 6k tiddlers?

all the best

BJ

Scott Simmons (Secret-HQ)

unread,
Feb 7, 2016, 2:48:25 PM2/7/16
to TiddlyWiki
On Sunday, February 7, 2016 at 2:49:42 AM UTC-5, Hegart Dmishiv wrote:

We've just done this exercise on the {{DesignWrite}} course, converting CSV to JSON and bulk importing tiddlers like that. Have a look at my exercise tiddler, and the link to the courseware.

Awesome!  I knew I was missing out by not following {{DesignWrite}}, but I didn't want to jump in without being able to commit the time.
 
Your examples look right up the alley of what I was thinking.  Maybe I'll give this a go the coming week and see how it works out.  (It would be just as easy to turn the HTML export into CSV or JSON as a stripped-down HTML store, after all.)

Scott Simmons (Secret-HQ)

unread,
Feb 7, 2016, 3:03:25 PM2/7/16
to tiddl...@googlegroups.com
Hi, BJ —


On Sunday, February 7, 2016 at 8:05:25 AM UTC-5, BJ wrote:

ff lets you backup your bookmarks as json - from this you could write some js to extract the bookmarks to tiddlers, but how are you going to organise 6k tiddlers?

That's the big question — but fortunately TiddlyWiki offers no shortage of organizational options and tools.  :)

Maxthon is my current browser of choice, and while it's always handled my large collection of bookmarks with aplomb, current development has moved it in a direction that's unfriendly to large bookmarks files.  :(  I should, however, be able to create a sidebar plugin for the browser that will allow me to display a TiddlyWiki in mobile mode in the browser's left-hand sidebar — effectively replacing the native Favorites Sidebar.  Some judicious editing of TiddlyWiki's sidebar could leave me with a TW that displays a search box at the top and a table-of-contents tree (mirroring the browser's bookmarks' folder structure) below that, with my search results being displayed (way) down below the tree, allowing me to navigate bookmarks pretty handily.

I'm thinking each bookmark will have its own tiddler and (occasionally) notes, and they'll be tagged (and sometimes given additional custom fields) in a way that will allow me to sort and display them multidimensionally — something I've never been able to do in a browser's bookmark manager.  For example, I might bookmark threads here in the Google Group and give them a field, type, with values like "bug," "suggestion," "help," or "concept."

With Maxthon in flux right now, the sidebar implementation is a "someday" consideration for the moment.  By the time I get there, the way the browser's plugins may have changed dramatically, so for now I'm just going to experiment with getting a good organizational scheme.  I can play around with the mobile display and viewing it through the browser sidebar later on.

(While I can't export directly to JSON from Maxthon, I could certainly move my bookmarks over to Firefox and use it to give me a standardized JSON file.  I was thinking of working with the XML Maxthon outputs, but once you know a good format TiddlyWiki can leverage, the rest becomes a matter of personal convenience.)

Leo Staley

unread,
Mar 7, 2016, 3:26:27 AM3/7/16
to TiddlyWiki
I'd like any updates to this if you've made any progress. I'm considering the same thing. 

Hegart Dmishiv

unread,
Mar 7, 2016, 5:26:26 AM3/7/16
to TiddlyWiki
Hi Leo,

There are some "issues" we've discovered with the CSV to JSON converter tool we've been using in the {{DesignWrite}} course. The main problem is that the cookie used by the website to keep the previously entered CSV, can be problematic. It is important to remember to clear input before pasting/importing another CSV file. Missing this step can cause the converter to generate malformed JSON which, when imported into TiddlyWiki, can corrupt your wiki, necessitating a restore from backup! As long as you're certain to clear input before you begin, you should be fine.

Another issue we've found is that it pays to ensure your tiddler field names are all lowercase, as TW fields are case sensitive.

Hope this helps,

Hegart.

Scott Simmons (Secret-HQ)

unread,
Mar 9, 2016, 7:51:35 AM3/9/16
to TiddlyWiki
I haven't had a chance to dig in on this yet, but I'm anxious to.

Rather than going the JSON route, I think I'm going to use regex to turn my bookmarks .HTML file into a very basic TiddlyWiki and import the tiddlers from there into an empty TW for sorting and manipulating.

Given the sheer number of bookmarks, I'd like to put as much forethought in as possible so I can create regular expressions that tag and name my tiddlers in one fell swoop.  I'm not sure how useful those efforts will be to others, but I'll definitely report back when I get into it (which probably wont't be for the next month, I'm guessing.  :(  ).
Reply all
Reply to author
Forward
0 new messages