Loading...
 
Features / Usability

Features / Usability


OpenOffice.org to tiki converter

posts: 18

Hi

I wrote a macro to convert OpenOffice.org writer (.sxw) documents to TikiWiki markup. I could only find one other macro like this on the web that converted MS Word documents. I wrote this for my own use but thought of sharing it. Please feel free to use it and modifiy it. The features of the macro are listed below.

1.Creates a file with TikiWiki markup from an OpenOffice.org Writer file and stores it in the same folder as the original file. (You can open an MS Word file or any other file and save it in .sxw format using Writer and then use this macro on that file.)

2.Identifies bold, italic and underlined text and creates TikiWiki markup accordingly.

3.Identifies Heading 1, Heading 2, ... Heading 5 styles and creates TikiWiki markup for those headings. All other styles are treated as normal text.

4.Prompts the user to select whether to add heading numbering (eg. 1.1.1, 1.1.2, ... 2.1.2, etc) automatically to TikiWiki marked text or not.

5.Identifies text colour and create TikiWiki markup for the coloured text.

6.Identifies centered text and add TikiWiki markup for centered text.

7.Identifies bullets and numbered lists and create markup to add numbers. (Bullets are also marked up as numbers. This is a limitation.)

8.Identifies the tables in the document add create table markup for TikiWiki.

9.Prompts the user to select whether to mark text in headings with explicit formatting (bold, italic, colour, centered, etc.) or not.

10.Prompts the user to enter the name of the TikiWiki page which will be used to name the exported file together with .sxw extension.

11.Extracts graphics that are anchored to either a paragraph or character or anchored as a character and stores them in the same folder as the original file.

12.Prompts the user to enter a version label which will be used to name the image files to preserve old image files in TikiWiki so that previous versions of the TikiWiki pages will retain old versions of graphics.

13.Graphics files are named with the unique TikiWiki page name together with an index number (1, 2, 3, etc.) and version label entered by the user. This creates a unique file name for the Graphics object in TikiWiki.

14.TikiWiki markup that points to the extracted graphics file is automatically inserted into the exported file. The user simply has to upload the extracted files to TikiWiki to display the images in the correct place in the TikiWiki page.

The limitations are

1.If tables have merged cells, the entire table may not get identified.

2.Colours of individual characters in tables cells are not identified. Colour in table cells are identified only if all the characters have the same colour.

3.Bulleted lists are identified as numbered lists.

4.Indented numbered lists are not correctly identified.

5.Headers, footers, foot notes, end notes, watermarks are not identified.

6.Graphics anchored to the page are not identified.

7.Right aligned and justified text are identified as left aligned.

8.Headings upto Heading 5 are identified (the style has to be named “Heading #??? exactly) and any other style will be treated as normal text.

Please make a copy of your original document before using this macro.

Please send me your feedback. I used OpenOffice.org 1.1.0 on Mandrake 10.0 (Linux) to write and test this. If you use this on any other platform, please let me know how it worked. If you could modify this to overcome the limitations, please share it with me.

Thanks

Neranjana

posts: 957

Hi Neranjana:

It looks very nice! Thanks to share your work (I'm also user of OOo and TIki, and interested in their import/export functions).

Btw, have you checked these links?:

  • OpenOffice2Tiki,
  • TikiDavDev,

and the two video-tutorials at escire.com using tikidav with OOo:

posts: 18

Hi xavidp

Yes I have seen those links. But I couldnt figure out how to use o3 for editing tiki pages because most of the instructions were in Spanish. Is there any site where I could find some info on using o3 as a TikiWiki editor in English? eg. Where can I get the plugin (if it is a plugin) for o3 to integrate with TikiWiki?

Thanks

Neranjana


posts: 18

Hi xavidp

Yes I have seen those links. But I couldnt figure out how to use o3 for editing tiki pages because most of the instructions were in Spanish. Is there any site where I could find some info on using o3 as a TikiWiki editor in English? eg. Where can I get the plugin (if it is a plugin) for o3 to integrate with TikiWiki?

Thanks

Neranjana