LCDproc development and user support list

Text archives Help


[Lcdproc] Announce: edition and validation tool for /etc/LCDd.conf


Chronological Thread 
  • From: domi.dumont at free.fr (Dominique Dumont)
  • Subject: [Lcdproc] Announce: edition and validation tool for /etc/LCDd.conf
  • Date: Sun, 11 Sep 2011 12:25:28 +0200

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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL:
<http://lists.omnipotent.net/pipermail/lcdproc/attachments/20110911/cce8ee19/attachment.pgp>



  • [Lcdproc] Announce: edition and validation tool for /etc/LCDd.conf, Dominique Dumont, 09/11/2011

Archive powered by MHonArc 2.6.18.

Top of page