Question
Hi,
I have some scripts which generate some data and update a page.
Instead of going through the filesystem (which gives me NO history/RCS protection)
I was wondering if a script already exists that would checkout through the web the page
and give you a file in your local workspace, and then you can store it back ?
vision:
cd /tmp
TwikiStore -get http://server.company.com/bin/twiki/Main/WebLeftBar > tmp1
echo "news " >> tmp1
cat tmp1 | TwikiStore -put http://server.company.com/bin/twiki/Main/WebLeftBar
Environment
--
GillesEricDescamps - 28 Oct 2004
Answer
Gilles Eric - take a look at building a command set for the
TWikiShellContrib - this is where such functionality should go.
--
MartinCleaver - 29 Oct 2004
see also
mechanise-test.pl
on
TWikiTestInfrastructure for another example of how this could be done (here's a snippet of the core part of what would be required:)
$mech->follow_link( text => 'Edit' );
$mech->form_name( 'main' );
my $topicText = $mech->value( 'text' );
$topicText .= "\n\nadd more text to the topic\n\n-- %MAINWEB%.TWikiTester\n";
$mech->field( text => $topicText );
$mech->click_button( value => 'Save' );
--
WillNorris - 29 Oct 2004
Indeed, you could even wrap such CGI access in a
TWikiShellContrib Command set, so that you get modularised command line access to parts of TWiki that don't have formal APIs.
--
MartinCleaver - 29 Oct 2004
Yet another way is via
WebDAVPlugin.
--
PeterThoeny - 04 Dec 2004