Tags:
create new tag
view all tags

SID-00790: Add a button that opens a perl script

Status: Answered Answered TWiki version: 4.1.2 Perl version:
Category: CategoryAutomation Server OS: RHEL 4.8 kernel 2.6.9-89 Last update: 15 years ago

Hello, we are using svn as a collaboration tool, and some of the documents we write in svn are copied to Twiki and should be synchronized. We already have a perl script that updates the content of Twiki pages with latest modifications from svn. What I would like to have now is a "Refresh" button on a Twiki page. When a user would click on this button the perl script would be called to refresh the Twiki pages with latest svn content. How do I create such a command? I'm very new to Twiki, I've played a little bit with text editing commands but I don't know a lot about it!

-- SophiePasquier - 2010-03-22

Discussion and Answer

Create a CGI wrapper for your script. See Google:perl+hello+world+cgi . From that script you can call your update script. For example, in Perl you can invoke an external script using backticks, such as: my $output = `/var/www/tools/update_stuff.pl`;

-- PeterThoeny - 2010-03-22

Thanks a lot Peter!

-- SophiePasquier - 2010-03-25

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Add a button that opens a perl script
SupportCategory CategoryAutomation
TWiki version 4.1.2
Server OS RHEL 4.8 kernel 2.6.9-89
Web server Apache 2.0.52
Perl version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2010-03-25 - SophiePasquier
 
  • 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-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.