Question
We would like to up/down load directly to Twiki via a PERL/C++ script. Can
you sent me doc's/examples on how this can be done. Thanks.
Environment
| TWiki version: |
|
| TWiki plugins: |
|
| Server OS: |
|
| Web server: |
|
| Perl version: |
|
| Client OS: |
|
| Web Browser: |
|
--
LenGiordano - 11 Jun 2004
Answer
The easiest thing to do is to use a program like "curl" to access TWiki URLs directly. An simple example of uploading to both TWiki topics and attachments can be found in function
target_upload in the the
SharedCode Build.pm module (use viewcvs to get it if you don't want to download). I have a short paper I wrote on the subject as well, though the server it's on is down at the moment. Remind me, if I forget to post it.
P.S. if you want to use the API directly from perl, i.e. without a network connection, then it's complicated but do-able. Look at the code for the latest beta, and see how the gateway scripts (view, edit, save etc) do it by calling functions in the UI package. But I wouldn't bother.
--
CrawfordCurrie - 12 Jun 2004