Loading...
 
Skip to main content

Custom Share Module 0.1dev

History: ConversionFromTWiki

Preview of version: 9

Synopsis

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, your mileage may vary. Expect to get your hands dirty.

Features

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:

  • Headings
  • Bullet Lists
  • Enumerated Lists
  • %HOMETOPIC% and %WEB% variable translation
  • Bold, Italic and Bold/Italic types
  • Preformatted text
  • Attached file syntax
  • Attached image syntax
  • Tables (though vertical span of cells is not possible)
  • External links
  • Wiki references

Installation

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.

Known Bugs

  • Program isn't finished yet.
  • I expect the regexp's aren't as robust as they could be in the conversion rules.

Todo

  • Handle attachments
  • Add translation rule for TWiki Math Plugin formulae
  • Come up with a srategy to handle %SEARCH directives
  • Handle migration of users?
  • Include a way to map TWiki wiki page names to different Tiki wiki page names?
  • Do something with the TOPICINFO metadata in the TWiki page.

Author

Art Davis

Files

See
 Error
The type parameter is missing
.

History

Advanced
Information Version
admin attachment conversion 20
View
Art Davis 19
View
Art Davis 18
View
Art Davis 17
View
Art Davis 16
View
Art Davis 15
View
Art Davis 14
View
Art Davis 13
View
Art Davis 12
View
Art Davis 11
View
Art Davis 10
View
Art Davis 9
View
Art Davis 8
View
Art Davis 7
View
Art Davis 6
View
Art Davis 5
View
Art Davis 4
View
Art Davis 3
View
Art Davis 2
View
Art Davis 1
View

Upcoming Events

1)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3) 
Tiki birthday
4)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting