<div dir="ltr">Hello Marco,<div><br></div><div>1) is just a setting, like:</div><div><br></div><div>    <span class="" style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">let</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"> </span><span class="" style="color:teal;font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">comment  </span><span class="" style="background-color:rgb(255,255,255);font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">=</span><span class="" style="color:teal;font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"> </span><span class="" style="color:rgb(85,85,85);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">IniFile</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">.</span><span class="" style="color:teal;font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">comment </span><span class="" style="color:rgb(221,17,68);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">";"</span><span class="" style="color:teal;font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"> </span><span class="" style="color:rgb(221,17,68);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">";"</span></div>
<div><br></div><div>2) shouldn't be a limitation at all.</div><div><br></div><div>For 3), have a look at the PythonPaste module, which also allows for "#" in values:</div><div><br></div><div><a href="https://github.com/hercules-team/augeas/blob/master/lenses/pythonpaste.aug">https://github.com/hercules-team/augeas/blob/master/lenses/pythonpaste.aug</a><br>
</div><div><br></div><div><br></div><div>For 4), have a look at the Quote module (used in various lenses), which allows to manage quotes automatically (double, single or both). The doc is at <a href="http://augeas.net/docs/references/lenses/files/quote-aug.html">http://augeas.net/docs/references/lenses/files/quote-aug.html</a>. See also the examples (unit tests) at <a href="http://augeas.net/docs/references/lenses/files/tests/test_quote-aug.html">http://augeas.net/docs/references/lenses/files/tests/test_quote-aug.html</a></div>
<div><br></div><div><br></div><div>Cheers,</div><div><br></div><div>Raphaël</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 22, 2014 at 1:35 AM, Zero Uno <span dir="ltr"><<a href="mailto:zerozerounouno@gmail.com" target="_blank">zerozerounouno@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I'm trying to create a slightly modified lens for INI-like files<br>
having the following features:<br>
<br>
1. comments only start with semicolons ";"<br>
2. parameter keywords con contain "@"<br>
3. parameter values can contain "#"<br>
4. ideally, parameter values should be able to contain double quotes,<br>
but maybe this is currently not possible<br>
<br>
I duplicated puppet.aug and started from there, but I'm still missing<br>
something: requirement n. 2 seems to be satisfied,  but I cannot<br>
satisfy n. 3, augeas returns a parse error when it encounters a<br>
parameter value containing a "#".<br>
<br>
I don't have my edited file at hand now, but anyway I redefined<br>
comment_re and to_comment_re by removing "#" from the regex.<br>
I've been looking at the file and AFAICT it's ok, I cannot understand<br>
why augeas still cannot parse the configuration files.<br>
<br>
Any suggestions?<br>
Thanks.<br>
Marco<br>
<br>
_______________________________________________<br>
augeas-devel mailing list<br>
<a href="mailto:augeas-devel@redhat.com">augeas-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/augeas-devel" target="_blank">https://www.redhat.com/mailman/listinfo/augeas-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Raphaël Pinson<div>Infrastructure Developer & Trainer</div><div>+33 479 26 57 93<div>+33 781 90 00 79</div><div><br></div><div>Camptocamp France<br>

Savoie Technolac<br>
BP 352<br>
48, avenue du Lac du Bourget<br>
73372 Le Bourget du Lac, Cedex<br>
<a href="http://www.camptocamp.com" target="_blank">www.camptocamp.com</a><br>
</div></div></div>
</div>