I want to import spreadsheets from HTML files into TiddlyWiki. The files' content looks like this:
*<html> * <head> <title>Search ....</title> </head> *<body> * <div> <div class="grid_9"> <table> <tr><td colspan="3" width="400"><h1>..... List</h1></td></tr> </table> <br> *<table* class="report-layout" border="1"> <thead> *<tr>* <!-- <th style="text-align:center;background-color:#BDBDBD;">Name</th> --> <th style="text-align:center;background-color:#BDBDBD;">Application No.</th> <th style="text-align:center;background-color:#BDBDBD;">Course Type</th> <th style="text-align:center;background-color:#BDBDBD;">Course Name</th> <th style="text-align:center;background-color:#BDBDBD;">First Name</th> <th style="text-align:center;background-color:#BDBDBD;">Middle Name</th> <th style="text-align:center;background-color:#BDBDBD;">Last Name</th> <th style="text-align:center;background-color:#BDBDBD;">Email</th> <th style="text-align:center;background-color:#BDBDBD;">Phone</th> .... </tr> </thead> *<tr *id="row_8797" class="odd"> <td>P3.........</td> <td>TEACHER TRAINING COURSE</td> <td>200H</td> <td>Natasha</td> <td></td> <td>K....</td> ... </tr> .... In short, it is a basic table in basic HTML format. The first row has column headers, and the following rows have the data. This file can be imported using the standard Import tool. As a result, a new tiddler is created, which has the same HTML content from the file. So, the data gets nicely displayed in the tiddler. What I'd like to do, however, is to add some wikitext decoration to these data. For example, where there is "Application ID" in the first column, I want to be a wiki link. Clicking on the link should create a new tiddler titled with the Application ID. And that tiddler's fields should be populated with values from that row. For example, there should be fields such as "First Name", "Last Name", "Email", each containing corresponding data from the table. I don't know how to approach this. But for a TiddlyWiki guru this may be trivial. For example, 1. is it better to process the data during import itself, or import it first and then run a post-import script? (I don't need to keep the original HTML in the Wiki) 2. whether there's a a DOM / SAX parser available, or I have to stick with regex 3. what is the best practice to pre-populate tiddler fields when it is created? Thanks in advance for any suggestions -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ce3bd2f1-9bf2-41d5-be4d-84ee5699d5a0%40googlegroups.com.