r3 - 15 Jun 2004 - 01:06:56 - PeterThoenyYou are here: TWiki >  Support Web > HowtoInterfaceDirectlytoTwikiviaAPI
Tags:
, create new tag

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

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo