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

TWiki version: TWikiRelease01Sep2004
Server OS:
Web server:
Perl version:
Client OS:
Web Browser:
Categories: Installation, Permissions, Deployment

-- 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

Edit | Attach | (削除) Watch (削除ここまで) | Print version | History : r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2004年12月04日 - PeterThoeny
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.

AltStyle によって変換されたページ (->オリジナル) /