Question
Have installed Twiki, but have some problems migrating some content from
the old
MoinMoin wiki. The content is generated by programs which I would
prefer could check in revised editions for the twiki. Is there a good approach
to do this, either directly or via a lynx-command?
- TWiki version: September 2001
- Web server: Apache
- Server OS: Linux
- Web browser: Mozilla
- Client OS: Linux
--
StigSandoe - 05 Nov 2001
Answer
I haven't tried this myself, but I suspect it may be easiest to convert the raw text of
MoinMoin into the raw text files used by TWiki. One example of this for another Wiki to TWiki conversion is at
Plugins.DolphinToTWikiAddOn.
MoinMoin:SaneInstallation
indicates that
MoinMoin uses a set of files for its pages, rather than a relational database, so this may well be an option. It is probably just a matter of writing some regular expressions that convert from one format to the other - Perl has some great features here, including non-greedy matching and lookahead matching, which should make it easier, though not trivial. A lot depends on how many
MoinMoin features are used by your Wiki, and how big it is - e.g. if there are only 3 pages using a certain feature you may as well convert them by hand.
Quite a lot of testing and use of backups would be advisable, of course
--
RichardDonkin - 05 Nov 2001
Clarification of Question
This was useful information if I was going to port all of the
MoinMoin content,
but in this case the pages are generated (and updated now and then) by a
script I have control over, and the pages will be generated from that script.
Basically I have a text-file adhering to twiki-formatting (as defined in Help)
and wish to check it into the system (as a normal user, I can do this as root
as well). Is there a set of commands to do this?
$ cp generatedfile SOMEDIR_IN_WIKI/generated
$ cd SOMEDIR_IN_WIKI
$ ci generated
$ updated_twiki_page
I hope this clarified my intent. Thanks.
--
StigSandoe - 05 Nov 2001
As a quick hack you could use the
RCS check-in setting in TWiki.cfg to check in your TWiki files, i.e.
ci -q -l -t-none -w'JohnDoe' TopicAbc.txt
This assumes that the topic is in TWiki syntax. Note that 3 spaces need to be replaced by a tab.
Note also that it is tricky to create TWiki 01 Sep 2001 type files with the correct meta information, i.e.
%META:TOPICINFO{author="JohnDoe" date="1007575536" format="1.0" version="1.1"}%
You can omit this and TWiki will upgrade the topic the next time you save it, however you will see a slight decrease in performance on view and
WebChanges because TWiki needs to access the
RCS file to get the topic information in case the meta data is missing.
--
PeterThoeny - 05 Dec 2001