admin@glassfish.java.net

Re: questions about converting html to wiki

From: Anissa Lam <anissa.lam_at_oracle.com>
Date: Fri, 04 Jun 2010 14:08:53 -0700

Hi Bobby,

Thanks for time and suggestion.
I got that done last night, hope i don't need to do that too often :)

However, what i don't understand is that, in the prefs, there is the
option of setting the editor to WYSIWIG editor (FCK). But once i set
that, trying to edit any page shows an empty page. It will be nice
if we can have this editor working, well, assuming it is better than the
current one.

thanks
Anissa.

Bobby Bissett wrote:
> On Jun 3, 2010, at 7:30 PM, Vince Kraemer wrote:
>> Anissa Lam wrote:
>>>
>>> I have an html doc, that i need to convert to a wiki page. Is
>>> there an easy way to do the conversion ?
>>
>> Not that I know of...
>
> Would a tool like this be useful for others? Out of curiosity, in
> about 20 minutes (sorry I didn't see this earlier) I wrote a Python
> app that turns this html:
>
> <table>
> <tr>
> <th>header0</th>
> <th>header1</th>
> <th>header2</th>
> </tr>
> <tr><td>data0</td><td>data1</td><td>data2</td></tr>
> <tr>
> <td>more data0</td>
> <td>more data1</td>
> <td>more data2</td>
> </tr>
> </table>
>
> Into this wiki markup:
>
> || header0 || header1 || header2
> | data0 | data1 | data2
> | more data0 | more data1 | more data2
>
> It's a simple sax handler that parses the input, so it has to be valid
> xhtml (I guess). And you can hack the output easily enough by editing
> a file that has methods like these:
>
> def th(data):
> print '||', data,
>
> def td(data):
> print '|', data,
>
> It's pretty simple, but could be expanded to handle most of what we
> want in wiki pages.
>
> Cheers,
> Bobby
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>