Tags:
tag this topic
create new tag
view all tags
---+!! !RunTopicsAddOn <!-- One line description, required for extensions repository catalog. * Set SHORTDESCRIPTION = TWiki tool to run \'view\' on a given set of topics in a given set of webs. --> %SHORTDESCRIPTION% %TOC% ---++ Motivation In some cases, !TWikiVariables like !%SEARCH{...}% (TWiki.VarSEARCH) and !%TREEVIEW{...}% (Plguins.TreePlugin) can be very resource heavy. The Plugins.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 Plugins.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: <verbatim> cd /my/twiki/path/bin/ perl ../runtopics webs=all topics=TreeView Main.TreeViewTemplateTopic </verbatim> On a fresh TWiki install, this would produce the following output: <verbatim> 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) </verbatim> 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. <verbatim> cd /my/twiki/path/bin/ perl ../runtopics webs=WebA, Web,B topics=TestTopic </verbatim> ---++ Installation Instructions * For an __automated installation__, run the [[%SCRIPTURL{configure}%][configure]] script and follow "Find More Extensions" in the in the __Extensions__ section. * See the [[http://twiki.org/cgi-bin/view/Plugins/BuildContribInstallationSupplement][installation supplement]] on TWiki.org for more information. * Or, follow these __manual installation__ steps: * Download the ZIP file from the extension home on twiki.org (see below). * Unzip ==%TOPIC%.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): | Main.TerjeAndersen | | | Copyright: | © 2014 CERN | | License: | [[http://www.gnu.org/licenses/gpl.html][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:__ %TWIKIWEB%.TWikiAddOns, %TWIKIWEB%.DeveloperDocumentationCategory, %TWIKIWEB%.AdminDocumentationCategory, %TWIKIWEB%.TWikiPreferences <!-- Do _not_ attempt to edit this topic; it is auto-generated. Please add comments/questions/remarks to the feedback topic on twiki.org instead. -->
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2019-01-25
-
TWikiAdminUser
Home
Site map
CMSPublic web
Main web
Sandbox web
PetshopSaigon web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
E
dit
A
ttach
Copyright © 1999-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.RunTopicsAddOn
.