twiki2tiki.php
- Migrate a TWiki web collection into TikiWiki.
twiki2tiki.php
may be a helpful start for automating the process of converting your TWiki web into TikiWiki pages. I wrote it to do the job on my particular installation (php-4.4.0 and MySql-3.23.59). Although I expect the code to be reasonably portable, I make no guarantees. Expect to get your hands dirty.
The program relies heavily on PHP MySQL functions and Perl-Compatible Regular Expression Functions. You'll need to have those extensions installed and be using a MySQL database then for this to work.
The script is written so you should be able to run it as many times as you want and data that's already existing in the Tiki database will just get updated with your TWiki pages. This can be useful for debugging the conversion process since you don't need to empty your tiki_pages each time you want to run the program. Also, in theory, you can maintain an active TWiki installation and use this script to continuously update the TikiWiki with it (although, any modifications you make in a TikiWiki page will get blown away with the TWiki content each time you run the code).
Handled Conversion Rules:
MAKE A BACKUP OF YOUR DATABASE. I'm not kidding. I make backups when running this code on my own database... I doubt you should trust me any more then I trust myself. Also, backup your TWiki installation. The script only reads the files in there... but best be safe.
Unzip twiki2tiki.tgz into a directory you can point your browser to. I strongly suggest you secure this directory (eg. user authentication). It will soon contain a config file with your database password in clear text. (You could also dump the files in some private directory and parse it by php manually but the output won't be as pleasant).
Edit the twiki2tiki_cfg.php file. You'll basically need to change just about every line to properly configure the script for your system. The file comments will tell you what to do.
Point your browser to twiki2tiki.php. Perhaps it will work.
1) |
19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
2) |
Tiki birthday |
3) |
17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
4) |
21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
5) |
19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting |