Tags:
admin_tool1Add my vote for this tag automation1Add my vote for this tag caching1Add my vote for this tag performance1Add my vote for this tag create new tag
, view all tags

RunTopicsAddOn

TWiki tool to run \'view\' on a given set of topics in a given set of webs.

Motivation

In some cases, TWikiVariables like %SEARCH{...}% (VarSEARCH) and %TREEVIEW{...}% (TreePlugin) can be very resource heavy. The VarCachePlugin allows us to cache these variables so that they don't need to be rendered every time.

But each time the cache is out of date, the next user who visits the page will have to wait for the cache to be rebuilt.

This AddOn were made to refresh topics like that by a system actor (a scheduled server job). When we have many of these topics spanning across several webs, the AddOn can help automating the process.

Usage

RunTopicsAddOn runs 'view' on given topics in given webs, creating a topic if a template is given. The invoking user is 'admin', so access controls are bypassed. The 'all' keyword works on webs, which selects all webs.

This is handy when your TWiki has several topics using VarCachePlugin to cache resource-heavy TWiki variables. The add-on iterates over the topics, visits them, and creates them if a template topic is set.

Examples

Run 'view' on the TreeView topic in all webs, creating it with by cloning Main.TreeViewTemplateTopic if it does not exist:
cd /my/twiki/path/bin/
perl ../runtopics webs=all topics=TreeView Main.TreeViewTemplateTopic

On a fresh TWiki install, this would produce the following output:

Creating Main.TreeView from template Main.TreeViewTemplateTopic ...DONE !
Running 'perl -T view -topic Main.TreeView -user admin ...' DONE! (1.264172)
Creating Sandbox.TreeView from template Main.TreeViewTemplateTopic ...DONE !
Running 'perl -T view -topic Sandbox.TreeView -user admin ...' DONE! (1.235088)
Creating TWiki.TreeView from template Main.TreeViewTemplateTopic ...DONE !
Running 'perl -T view -topic TWiki.TreeView -user admin ...' DONE! (1.624523)
Creating Trash.TreeView from template Main.TreeViewTemplateTopic ...DONE !
Running 'perl -T view -topic Trash.TreeView -user admin ...' DONE! (1.208486)
Creating _default.TreeView from template Main.TreeViewTemplateTopic ...DONE !
Running 'perl -T view -topic _default.TreeView -user admin ...' DONE! (1.240197)
Creating _empty.TreeView from template Main.TreeViewTemplateTopic ...DONE !
Running 'perl -T view -topic _empty.TreeView -user admin ...' DONE! (1.207983)

Run 'view' on the TestTopic topic on WebA and WebB webs. If WebA.TestTopic or WebB.TestTopic does not exist, skip running view on it.

cd /my/twiki/path/bin/
perl ../runtopics webs=WebA, Web,B topics=TestTopic

Installation Instructions

  • For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.

  • Or, follow these manual installation steps:
    • Download the ZIP file from the extension home on twiki.org (see below).
    • Unzip RunTopicsAddOn.zip in your twiki installation directory.
    • Set the ownership of the extracted directories and files to the webserver user.
    • Install the dependencies (if any).

AddOn Info

AddOn Author(s): TerjeAndersen  
Copyright: © 2014 CERN
License: GPL (Gnu General Public License)
AddOn Version: 27403 (2014-05-20)
Change History: Item7497: Created RunTopicsAddOn
Dependencies: None
AddOn Home: http://twiki.org/cgi-bin/view/Plugins/RunTopicsAddOn
Feedback: http://twiki.org/cgi-bin/view/Plugins/RunTopicsAddOnDev
Appraisal: http://twiki.org/cgi-bin/view/Plugins/RunTopicsAddOnAppraisal

Related Topics: TWikiAddOns, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 RunTopicsAddOn.md5 r1 manage 0.2 K 2014-05-19 - 23:23 TerjeAndersen  
Compressed Zip archivetgz RunTopicsAddOn.tgz r1 manage 4.7 K 2014-05-19 - 23:23 TerjeAndersen  
Compressed Zip archivezip RunTopicsAddOn.zip r1 manage 7.1 K 2014-05-19 - 23:23 TerjeAndersen  
Unknown file formatEXT RunTopicsAddOn_installer r1 manage 3.5 K 2014-05-19 - 23:23 TerjeAndersen  
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2014-05-20 - TerjeAndersen
 
  • 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-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.