[augeas-devel] multiline inifile values

Raphaël Pinson raphink at gmail.com
Wed Jun 8 06:00:27 UTC 2011


Hi Kent,

On Tue, Jun 7, 2011 at 9:58 PM, Kent Tenney <ktenney at gmail.com> wrote:

> Howdy,
>
> from inifile.aug
>
> "About: TODO
>  Things to add in the future
>  - Support double quotes in value
>  - Support multiline values (is it standard?)"
>
> I don't know if multiline values are standard or not,
> but they are part of the Python configparser dialect of ini.
> http://docs.python.org/library/configparser.html
>
> zc.buildout is a very widely used tool for managing
> Python software installations, it is based on ini files
> with multiline values. It would be great if Augeas
> understood them. If I could provide a patch I would ...
>
>
The hard part about multiline values in IniFile is their format: indented
values with a constant indentation level.

I've scratched my head in the past to see how Augeas could parser and
represent that.

The first part is how to represent them. Should multiline values be stored
in one node with "\n" characters (and indentations), or should they be split
into several nodes?

The second question is how to modify a multiline value, namely how do we
keep the same indentation level for new lines in Augeas, since Augeas cannot
remember (afaik) the indentation level of previous lines?


Maybe David would have a clue on this.


Regards

Raphaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20110608/456a5edf/attachment.htm>


More information about the augeas-devel mailing list