Convert HTML to TW5 Tables?

422 views
Skip to first unread message

Ed

unread,
Mar 23, 2016, 12:35:58 PM3/23/16
to TiddlyWiki
Dear All,

At work I have a database and I want to get the info into TW5.
The only way that I can do it is exporting an item to HTML and
that I can put in a tiddler. That works. It looks even OK>

But editing that whole HTML-mess it is a downright nuisance,
really too much work as there about 1500 - 2000 items.

I'v been looking at converters online and I can make e.g. PDFs,
Excels or or lightly fornatted text.

Is there a way to convert HTML right away to TW5 tables?
Thanks is advance
Salut! Edm.

Mat

unread,
Mar 23, 2016, 1:07:27 PM3/23/16
to TiddlyWiki
You could probably do a simple search-replace using e.g spreadsheet or text editor. There are only a handful of html table tags so it should be pretty quick, I think.

Also, maybe your database could export into other formats than html, e.g json or csv?

<:-)

Ed

unread,
Mar 24, 2016, 9:19:17 AM3/24/16
to TiddlyWiki
Hi Mat,

No sorry, like I said only HTML. No chance that the programmers
would code anything new. My department is low on the priority list.
Relatively simple request for the functionality of doing a batch
replacement of a tag/word in a field is already for months on the
priotritylist. Frustrating.

I have indeed been thinking about the search & replace method,
but believe in my case that is no option. I need a good conversion
method and I can't write that myself, was hoping that one of the
top TW-wizzards would have come up with something like that
already.
Salut! Ed



Op woensdag 23 maart 2016 18:07:27 UTC+1 schreef Mat:

Mat

unread,
Mar 24, 2016, 9:48:51 AM3/24/16
to TiddlyWiki
Why do you need it to be "TW5 tables", i.e with pipe characers instead of html tags? FYI, it is not painless to edit "TW5 tables" either because those pipe characters don't "line up" in edit mode and it's easy to miss or add pipe characters in the wrong places.

Perhaps what you're really asking for is just a simpler "UI" to edit the content that is in the html table? Like some kind of form.

Not saying I have a solution for this, but just to make sure you're really asking for what it is you want help with.

<:-)

Ed

unread,
Mar 24, 2016, 12:51:48 PM3/24/16
to TiddlyWiki
Hi Mat,

thanks for getting back to me. I appreciate that!

Oh, yes I know the edit mode of the TW5 tables, that can be really frustrating too.
But I use it actualy quiet often, especially when I ma preparing travelschedules
where I want to compare different days, routes of transports. Departure/arrival times,
stopover time, names places, meetings etc.
But the HTML export I get is far far worse then the TW5 tables

Cheers! Ed.

Op donderdag 24 maart 2016 14:48:51 UTC+1 schreef Mat:

Devin Weaver

unread,
Mar 24, 2016, 3:42:42 PM3/24/16
to TiddlyWiki
An alternative solution to making a conversion script would be to export the data into something other then markup. Maybe a JSON output. Then with the JSON data in a tiddler have a some JavaScript widget convert it into a HTML table.

I suggest this because the amount of data (2000 records) is way to large to edit as markup! It would be easier to have that data in an inter operable format that you could query, mutate, or edit through means beyond just text.

In fact TiddlyWiki has JSON data support built in.

RichardWilliamSmith

unread,
Mar 24, 2016, 6:26:58 PM3/24/16
to TiddlyWiki
Hi Ed,

What are you exporting it from? Are you able to generate a csv?

Richard

Duarte Farrajota Ramos

unread,
Mar 25, 2016, 12:33:22 AM3/25/16
to TiddlyWiki
The way I see it you could try two different methods

  1. If you really want to edit them directly inside TiddlyWiki in a WYSIWYG manner you could try using the fantastic CKEditor plugin for TiddlyWiki by BJ. It as its fair share of rough edges but I've been using it for quite a while now and it does it's job well if you put up with it's bugs.
    Since it is an HTML table you can simply copy paste it directly into the text area. If you make a custom local install of CKEditor you can include one of the table editing plugins and have an almost full fledged WYSIWYG table editor in TiddlyWiki without any coding or dealing with wiki text.

  2. Most spreadsheet applications can receive data from HTML tables by simple copy paste, like Google Docs, Excel, LibreOffice etc. just copy your table and paste it wherever you feel most comfortable working. From there it should be fairly easy to export to any other more TiddlyWiki friendly format like CSV. Last i checked LibreOffice had a pretty decent CSV importer/exporter. You can then use any text editor or utility with find and replace or regex to tame your table into submission, and replace any CSV with wiki text delimiters.

BJ

unread,
Mar 25, 2016, 6:32:41 AM3/25/16
to TiddlyWiki


On Friday, March 25, 2016 at 4:33:22 AM UTC, Duarte Farrajota Ramos wrote:
The way I see it you could try two different methods

  1. If you really want to edit them directly inside TiddlyWiki in a WYSIWYG manner you could try using the fantastic CKEditor plugin for TiddlyWiki by BJ. It as its fair share of rough edges but I've been using it for quite a while now and it does it's job well if you put up with it's bugs.
Hi Duarte, I have made some improvement in the latest version (at http://bjtools.tiddlyspot.com)
cheers
BJ

Duarte Farrajota Ramos

unread,
Mar 25, 2016, 1:01:31 PM3/25/16
to TiddlyWiki
Hey that's great news BJ, gonna give it a try as soon as I get a chance. Thanks for the update

Duarte Farrajota Ramos

unread,
Mar 26, 2016, 12:48:10 AM3/26/16
to TiddlyWiki
Ok, gave it a quick test and also updated my CKEditor while I was at it, and it seems a lot more stable and usable now, CKEditor now correctly resizes and errors seem less frequent.
Some script errors here and there but they are most likely caused by CKeditor plugins not Tiddlywiki itself (I've noticed that the "Store in Browser" plugin is often the culprit, and frequently generates problems)

Once again many thanks for the update. I'll keep using it regularly as I always do, if I find any problems I'll let you know.
Reply all
Reply to author
Forward
0 new messages