Subject: Developers of Sympa
List archive
- From: Marc Chantreux <address@concealed>
- To: IKEDA Soji <address@concealed>
- Cc: "address@concealed" <address@concealed>
- Subject: Re: [sympa-developpers] ListDef parser
- Date: Wed, 19 Mar 2014 14:01:51 +0100
Hi Soji,
Any advice about the way to write my parser ?
On Wed, Mar 19, 2014 at 09:22:44PM +0900, IKEDA Soji wrote:
> I become depressed thinking that we must maintain current parser
> of Conf and List modules in the future.
don't: the format is *very* simple to parse (the current parser doesn't
reflect this simplicity though).
> I remember past discussion about format of config files.
> I prefer to some other general format such as YAML, JSON, ...
this would remove some lines of code from sympa but we will lose
something important: unix friendlyness.
the current format make it very easy to loop on lines to extract
informations from C, seq, awk … and this make sympa very friendly for
sysops!
consider:
awk '
/^editor/,/^$/ {
if ($1 ~ /email/) {print $2}
}
' config
this will work without extra tool.
so if removing the old format is planned, providing a tool to query the
config file will be mandatory.
> They are disadvantageous when users want to edit manually,
i really think config files would be easier to edit if stored in the
YAML format. this is an example
editors:
address@concealed:
reception: mail
visibility: noconceal
gecos: Sylvie
address@concealed:
reception: mail
visibility: noconceal
shared_doc: { d_edit: owner, d_read: private }
clean_delay_queuemod: 15
or even
editors:
address@concealed: {reception: mail, visibility: noconceal,
gecos: Sylvie }
address@concealed: { reception: mail visibility: noconceal }
shared_doc: { d_edit: owner, d_read: private }
clean_delay_queuemod: 15
is currently (with the sympa format) written as:
shared_doc
d_edit owner
d_read private
clean_delay_queuemod 15
editor
reception mail
email address@concealed
visibility noconceal
gecos Sylvie
editor
reception mail
email address@concealed
visibility noconceal
gecos Frédéric
so i really think we need to support both.
regards
--
Marc Chantreux
Université de Strasbourg, Direction Informatique
14 Rue René Descartes,
67084 STRASBOURG CEDEX
☎: 03.68.85.57.40
http://unistra.fr
"Don't believe everything you read on the Internet"
-- Abraham Lincoln
-
Re: [sympa-developpers] subroutine template was Re: Working on repository,
Guillaume Rousse, 03/18/2014
-
Re: [sympa-developpers] subroutine template was Re: Working on,
Marc Chantreux, 03/19/2014
- Re: [sympa-developpers] subroutine template was Re: Working on, Etienne MELEARD, 03/19/2014
-
[sympa-developpers] ListDef parser,
Marc Chantreux, 03/19/2014
-
Re: [sympa-developpers] ListDef parser,
IKEDA Soji, 03/19/2014
-
Re: [sympa-developpers] ListDef parser,
Marc Chantreux, 03/19/2014
- Re: [sympa-developpers] ListDef parser, IKEDA Soji, 03/20/2014
-
Re: [sympa-developpers] ListDef parser,
David Verdin, 03/20/2014
-
Re: [sympa-developpers] ListDef parser,
Marc Chantreux, 03/20/2014
-
Re: [sympa-developpers] ListDef parser,
David Verdin, 03/21/2014
- Re: [sympa-developpers] ListDef parser, Marc Chantreux, 03/21/2014
-
Re: [sympa-developpers] ListDef parser,
David Verdin, 03/21/2014
-
Re: [sympa-developpers] ListDef parser,
Marc Chantreux, 03/20/2014
-
Re: [sympa-developpers] ListDef parser,
Marc Chantreux, 03/19/2014
-
Re: [sympa-developpers] ListDef parser,
IKEDA Soji, 03/19/2014
-
Re: [sympa-developpers] subroutine template was Re: Working on,
Marc Chantreux, 03/19/2014
Archive powered by MHonArc 2.6.19+.