0

I want to create an augeas lens to modify mailman lists. The lists are stored in a binary file which can be exported to a plaintext file using config_list -o /tmp/config my_list and reimported by replacing -o by -i.

The goal is to build an augeas tree like this:

/mailman/my_list/real_name = "my mailman list"
/mailman/my_list/description = "This is my first list"
...
/mailman/another_list/real_name = "my other list"
/mailman/another_list/description = "This is just another list"
...

Is is possible to build a lens which produces the given tree by using the mailman commands list_lists and config_list?

Thanks, krissi

0

Augeas cannot work directly with input/output commands. However, you could use bindings with the aug_store and aug_retrieve API calls in Augeas 1.0.0 to manipulate the strings in memory.

As an example, you might be interested in auggrep, a small bash utility using Augeas to parse logs (kind of a proof of concept thus far).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.