import1Add my vote for this tag create new tag
, view all tags

Zwiki to TWiki Add-On

I've a method for migrating just the latest version of each page.

Inside the zwiki site, create a python script (using the management interface) like so:

items = context.objectValues(['ZWiki Page'])
for wikipage in items:
   print '-----------------------------------------------------------'
   print wikipage.Title()
   print '----'
   print wikipage.raw
return printed

Then do something like this:

$ wget -r -np http://foo.bar/zwiki/my_export_script

Then save the following python to a file in the same dir as the stuff you downloaded.

import sys
import os
f = file(sys.argv[1])
data = f.read().strip()
stuff = data.split("-----------------------------------------------------------")
bits = []
for bit in stuff:
for bit in bits:
      f1 = file(os.path.join('zwiki',bit[0].strip()),'wb')

Now run it:

$ cd foo.bar/zwiki
$ python zwiki-split.py my_export_script

It will create a zwiki dir with a bunch of files which you can import to twiki. The import step and the inevitable cleanup of the resulting pages are manual at this stage.

Have a look at the extension of this script described at ZwikiToTWikiAddOnDev

-- TobiasEscher - 2009-07-02

Add-On Info

  • Set SHORTDESCRIPTION = Convert Zwiki content into TWiki format

Add-on Author: TWiki:Main/PaulWise
Add-on Version: 02 Feb 2005 (v1.000)
Change History:
02 Feb 2005: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: Public Domain
Add-on Home: http://TWiki.org/cgi-bin/view/Plugins/ZwikiToTWikiAddOn
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ZwikiToTWikiAddOnDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ZwikiToTWikiAddOnAppraisal

Related Topic: TWikiAddOns

-- TWiki:Main/PaulWise - 02 Feb 2005

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.