Tags:
create new tag
view all tags

Question

This may be a bit irrelevant for this web but I would be greatly obliged if I got some help.

A twiki installation exists on my office intranet.
I have been assigned a task which requires some perl scripting on the client side.
Basically, I need the perl script to automatically post some stats to a dedicated twiki page.

The perl script must do the following:

  1. Login daily (automatically) to twiki as a guest user
  2. Edit a twiki topic
  3. Save the topic
  4. Log off.

I have been using the libWWW Perl module as follows:

$req = HTTP::Request->new(GET => 'http://server.office.com/twiki/bin/edit/Project/RegressionResults');
$req->authorization_basic ('username', 'pass');
print $ua->request($req)->as_string;

How do I add information and post the resulting form back to twiki using perl from the client side ?
Am I using a hopelessly wrong approach ? Is there some easier way to do this ?

I am a bit of a newbie to poth perl and twiki and am stumped! Thanks!

  • TWiki version:Version: 01 Dec 2001
  • Perl version: 5.8.0
  • Web server & version:
  • Server OS:RedHat 7.2
  • Web browser & version:
  • Client OS: Mandrake 9.0

-- TWikiGuest - 05 Mar 2003

Answer

IIUC, Plugins.MailToTWikiAddOn might help you started. Now you just need to write AI program to contribute content. smile Package it as a plugin, I'll use it for our Twiki... wink

-- PeterMasiar - 06 Mar 2003

The TWikiPlugins API of TWikiRelease01Feb2003 has functions to read and write topics, readTopicText() and writeTopicText() respectively. See details in TWikiFuncModule documentation. You can use that in a scrip, called updatetwiki for example.

-- PeterThoeny - 09 Mar 2003

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2003-03-09 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.