TWiki add new topic programmatically

563 Views Asked by At

How can I add a new topic to TWiki programmatically?

I've got a working TWiki (http://twiki.org/) installation, everything works fine.

I need to find a way to create and add new Topics through the command line, programmatically.

Any ideas how this can be accomplished?

Thanx!

d.

2

There are 2 best solutions below

2
On BEST ANSWER

What I did was

  • take a look at some wiki pages (files in <twiki-home>/data/Main/<PageName>.txt) to figure out the file/text format (pretty much what you see in the browser, preceded by one line of meta info)
  • generate that text format with a perl script
    with content based on data from a DB or some Excel
  • copy the files to the apropriate location using putty's pscp on windows

0
On

I think using TWiki scripts is a more "clean" way, as you wouldn't have to worry about metadata in the TXT file or update the .changes file.

Just use wget to make a POST call using the 'save' script (see documentation here)