CDot said - raise an issue "no documentation for .spec files"
Here is the high-level overview:
- Create a
Config.spec
file in the plugin directory (i.e., the TWiki/Plugins/XXX/
directory for a plugin named XXX
- In that spec file, follow the style of
TWiki.spec
to document your settings and give defaults. You can either create a new sub-section in plugins or put the settings into the plugin section. It is best to follow the style of the examples below.
Examples:
- From TWiki::Contrib::JSCalendarContrib
#---+ Contrib
#---++ JSCalendarContrib
# **STRING 10**
# Style setting
$TWiki::cfg{JSCalendarContrib}{style} = 'blue';
# **STRING 5**
# Language setting
$TWiki::cfg{JSCalendarContrib}{lang} = 'en';
1;
- From TWiki::Plugins::EditTablerowPlugin
#---+ Plugins
#---++ EditTablerowPlugin
# **BOOLEAN**
# Debug setting
$TWiki::cfg{Plugins}{EditTablerowPlugin}{DEBUG} = 0;
1;
Note that currently you can stick your settings anywhere by creating the appropriate section markers. Probably there should be some limitation on that. --
TW
Excellent examples, Thomas, thanks! ...but unfortunately they are not in SVN. The only example of a
Config.spec
I have found was that of MainInContrib, and this does
not have a
#---+ Contrib
header (it should be "Contribs", by the way).
I have never found out that entries are collected if they have a common subheading.
I have copied your text and discussion to
TWiki:Codev.SpecifyingConfigurationItemsForExtensions. State is "Actioning".
Checking in
CC's suggestion from
TWiki:Codev.SpecifyingConfigurationItemsForExtensions now, and setting to "Waiting for Release" because the ability to write spec files should be in the release notes --
haj
4.1.0 released
KJL