This is my first post in English, so I apologize in advance for my poor grammar.
I'll try to explain how to export all the pages of a Trac wiki into a Dokuwiki . All the process is based in my own shell script, which uses trac-admin, wget and html2wiki to export all the content of your Trac wiki into a dokuwiki folders.
At a glance, the main steps performed by the script are the following:
- Get the Trac wiki pages as a HTML files using wget.
- Remove all the HTML code belonging to the Trac page itself.
- Convert all the pages from HTML to Dokuwiki format (using html2wiki).
- Fix some internal/media links and transform footer attachments into dokuwiki format.
- Rename all the pages and media from upper to lower case.
The output of the script are two tarball files. One with the Dokuwiki pages, and the oter one with the media files.
As you probably know, the pages in a Dokuwiki are stored in simple text files,using the Dokuwiki format. All these pages are stored inside a folder called "pages", using different subfolders for every namespace on the wiki. The same occour with the media files. All of them are stored inside folders named as the namespace they belong to, beneath the "media" folder. So, you just need to extract the content of the media tarball into the media folder and the content of the pages tarball inside the pages folder. And that's all, your pages are now stored inside a Dokuwiki.
If you want to see the script, click on the "Leer más" link below. |