Re: Announce: edition and validation tool for /etc/LCDd.conf
Dominique Dumont <[email protected]>
| Newsgroups | gmane.comp.sysutils.lcdproc |
|---|---|
| Message-ID | <[email protected]> |
Hello
Sorry for the delay in following this stuff up. Vacation, new rakudo release
to package for Debian, and some bugs to fix got in the way...
Le Thursday 21 July 2011 22:45:23, Markus Dolze a écrit :
> On 20.07.2011 18:38, Dominique Dumont wrote:
> > Can I propose patches to improve LCDd.conf comments in this way ?
>
> yes, please do so.
>
> Be aware that some drivers have options which are not mentioned in the
> config file
These hidden options can be dealt with when issues arise.
> nor are all compile time settings explained (things you can
> configure by changing some header file). But those are only need in rare
> cases anyway.
Agreed. Anyway, I'd rather focus on run time options, i.e. the ones that can
be changed without re-building lcdproc.
For now, I'd like to discuss the best way to achieve the following goals:
- provide instructions understandable by Config::Model to enhance lcdproc
config editor/validator
- make these instructions writable by lcdproc contributors without requiring
them to read tons of manual pages
- provide some information to end user (albeit in a more formal way than plain
english)
Here's a preliminary set of comments to show what I have in mind and start the
discussion:
In [server] section:
# ...
# NOTE: Always place a slash as last character !
# [ match:"\/$"; assert:"-d" ]
DriverPath=/usr/lib/lcdproc/
Here's I reuse the convention already found in this file (square brackets) to
provide some more constraints. The match requirement does ensure that the NOTE
about trailing slash is taken into account. The assert statement is a bit of
Perl code (could also be bash code here) to ensure that DriverPath is a
directory,
# { warn_if_match:"CFontz633"
# message="this driver is deprecated, please use CFontzPacket driver with
Model=633 instead."
# load="server Driver=CFontzPacket - CFontzPacket model=633"
# }
Driver=curses
Here the deprecation of CFontz633 is taken into account. User will be warned
with the specified message if CFontz633 driver is selected. The load statement
is a bit of a model specification that enable Config::Model to fix the
deprecated driver statement and update accordingly model parameter in the new
[CFontzPacket] section.
Since these instructions are a bit more involved than the previous example,
curly bracket are used. They must contain Config::Model format.
# Sets the reporting level; defaults to 2 (warnings and errors only).
# [ value_type: int; max: 3; default: 2; ]
# { help 0:"no report" 1:"reports errors" 2:"reports warnings" 3:"reports
info" }
ReportLevel=3
LCDd.conf file did not specify the meaning of Report levels, so I did some
guesswork which is probably wrong. No matter.
The idea is to show helpful message to end user when he selects report level.
The help message is updated on the GUI when user select different report
levels.
I won't go now into further details. A lot of similar constraints can be added
in other sections of LCDd.conf comments.
So, what do you think of adding this kind of information in order to help end
users?
All the best
Dominique
--
http://config-model.wiki.sourceforge.net/ -o- http://search.cpan.org/~ddumont/
http://www.ohloh.net/accounts/ddumont -o- http://ddumont.wordpress.com/
_______________________________________________
LCDproc mailing list
[email protected]
http://lists.omnipotent.net/mailman/listinfo/lcdproc
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJObIyaAAoJEMMfT9lJqytsOI8P/RQEuAQpzRRaLmQGuzz+robc e2NFV9qVSpVgSKPWucwCKLwqZx8zDEdaiEStbhsxRIkA6JUBX28li2UI1Sa7YT8J 6fIlOzc4RcsSFMa5SMaTB9ZyWBW4ulA9gYUYadjcrj7eysc/i5wT59SIaMa9QhB4 OJU/tX3IhP9CaWgkn/9WwmUhqtKduGgTDi7BcXMrZLeFO84veEvRZusDtLJiEr7Q GKaV8MKvwnU7Tw4cX12OCbsgdT5NiVPYJ9lenGMD1PIEFTAS5tJm6xWfOPEzGjz8 wIE0eN4e8aCylX9d2sH150Fu1te2OtqzGxdfDGLnG5jWVMQ0UVVUzERQQQ676/Z0 ynNbF02Dhxv7YPGzeVQ2PcIh2N239x4w9seTSww1WO+BIUdkAkudQ2XYyHlJ5mc+ IG+Eh0VGFcePUax9JvzIVqZjSKitvHZXRborTs8fBb4lOf1Tu+7Z+MGTPAWOjEEm xsYbwootLOSOKfgGKKn32ATo0nkWxcnL5+3wluv8oUdL1b+ibYvUqAM829vlAwxV Vll+0poqYXDUlt64/0v5sdGaX/R/YCP29JkXaNt/45WwcqYOV0TkNDMtFnYY+Wtb BVAg/v9QiEMjV3ZsqPe8Lm7q6LruukfnGjL4JVCvSUPH9fmOPjqqZg4riUMO+EvE k6ersCqN+kPt95Q/3wcI =v4Se -----END PGP SIGNATURE-----