Question
Just wondering what the procedures would be to do a mass update of topics and attachments.
I would like to use Twiki

to be a simple knowledge management utility. We have a number of documents that I would like to attach and bring into twiki topics.
To do this one by one would be to time consuming.
Any help would be great.
- TWiki version: Latest and greatest
- Perl version:
- Web server & version:
- Server OS:
- Web browser & version:
- Client OS:
--
JayConway - 13 May 2003
Answer
This is not a complete answer, but it may get you started: Since TWiki stores its topics as plain-text files, you could go the "brute force" way and simply convert all your documents to plain text and then copy them into a TWiki web directory (
twiki/data/Yourweb/ ). This will quickly get you a lot of pages, but each page still needs to be "gardened" afterwards, for instance you need to change each file name into a
WikiWord. The pages won't be interlinked automatically (because they don't mention eachothers' new WikiWord filenames) but they will all be listed in the
WebTopicList and
WebIndex. It's a start...
Also, very likely the plain-text contents aren't nice to look at inside TWiki, but this can be updated through the normal browser interface as you start working with your new topics.
There might be other ways to add a large number of documents into TWiki as topics, but I can't think of any right now. I haven't heard of any automated mass conversion tool.
--
TorbenGB - 14 May 2003
You could try writing a Perl script with
CPAN:LWP
or
CPAN:WWW::Mechanize
that automates the process of attaching files - however, this would require some Perl coding (see
PerlTips) and debugging. I have seen one script to attach files to a TWiki page that was not too complex, but this one would be more complicated since you'd have to match documents to specific TWiki page names, and probably create the pages as well.
--
RichardDonkin - 14 May 2003
At work we had once the need to do a mass-update of a set of topics matching a search criteria. I did a quick hack for one time use. A temporary update routine in a Plugin got fired off by a
%EXECUTE{}% variable. It understood an
action="update" parameter. Since this is a dangerous operation we need to make sure that no one else is executing this while the routine is active. A simple solution is to write
%EXECUTE{"action=\"%URLPARAM{"action"}%\""}% in a topic. That way nothing happens until you view the topic with a
?action=update URL parameter.
--
PeterThoeny - 15 May 2003
Thanks for all the suggestions. I am not a perl programmer, so that is out. Looks like brute force is the option of choice. I still like this product and concept though.
--
JayConway - 15 May 2003