tags:

views:

98

answers:

1

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.

A: 

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


lexu
Very nice... and easy. One more file to change is .changes, which I need to append a single line with the topic, author, timestamp, and version. Thanx!
dengel
another thing I forgot to mention: beware of access rights to the file! My original copy was done with root => files were not visible in the webbrowser, since the httpd couldn't read/access them.
lexu