Loading...
 
Tiki Importer

Tiki Importer


Importing wiki-formatted text with HTML via script

I'd like to take Office documents and import them into Tiki Wiki without any user intervention (other than dropping the file in the appropriate directory).

Here's what I've accomplished so far:

1. Got Unoconv working with Perl's HTML::WikiConverter
2. Took a word doc and converted it to HTML/wiki format

I know it's possible to create pages from the output of these steps manually by going to Edit a new page, and insert HTML content with the option to "Parse wiki syntax within the html code." enabled. However, I'm looking to automate the process. Any idea how I might do this?

Here's what I've gathered so far. Start with the "tiki-editpage.php" code, and somehow call "lib/wiki-plugins/wikiplugin_html.php" to make the appropriate conversion, and then eventually create the page. However, I've no clue how to go about this, other than mimic the steps a user would follow to do this process manually (by clicking the "HTML" button in the toolbar, copying/pasting the HTML-wiki content, and saving).

Brazil

Hi Alex,

If you know PHP check the method TikiLib::create_page() (file lib/tikilib.php). It does exactly what you need.

There is an example on how to use it in the code of the Mediawiki importer. See the function TikiImporter_Wiki::insertPage() (file lib/importer/tikiimporter_wiki.php

Rodrigo

alexescalona wrote:

I'd like to take Office documents and import them into Tiki Wiki without any user intervention (other than dropping the file in the appropriate directory).

Here's what I've accomplished so far:

1. Got Unoconv working with Perl's HTML::WikiConverter
2. Took a word doc and converted it to HTML/wiki format

I know it's possible to create pages from the output of these steps manually by going to Edit a new page, and insert HTML content with the option to "Parse wiki syntax within the html code." enabled. However, I'm looking to automate the process. Any idea how I might do this?

Here's what I've gathered so far. Start with the "tiki-editpage.php" code, and somehow call "lib/wiki-plugins/wikiplugin_html.php" to make the appropriate conversion, and then eventually create the page. However, I've no clue how to go about this, other than mimic the steps a user would follow to do this process manually (by clicking the "HTML" button in the toolbar, copying/pasting the HTML-wiki content, and saving).


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting