Question
Hello, question answerers -
I want to move some existing documents to a TWiki site. I'd like to write a perl program to do the necessary conversion.
What's the best way,
from within perl, to create a new topic and the associated version control stuff? I suppose I could impersonate a web browser and invoke the 'save' CGI, but I'm hoping there's a less cumbersome way.
P.S. I'm an experienced perl programmer, so terse, technical answers are fine.
--
KevinWalker - 04 May 2002
Answer
Take the register script as an exampe, it creates user topics. See the part with comment
# create user topic if not exist: You supply the text, create a meta data object, then call
TWiki::Store::saveTopic().
Note that this is not a published function, it might change with an upcoming release. All official functions that plugins can use are in
TWiki::Func.
--
PeterThoeny - 04 May 2002