On 1 February 2017 at 21:48, Michael Hall <[email protected]> wrote:

> On a related note, does anybody have a suggestion on a lightweight way
> of programmatically modifying configs in .ini, XML or JSON?
>
> I have a couple of use-cases (erlang-based nosql databases) where the
> server updates the the local configuration, so I can't just overwrite
> the whole thing every time. Didier's example will work for a very basic
> key=value config file, but not something more structured, and I'd hate
> to introduce Python, Perl or Java just for this.
>

Really? I thought Python was an excellent choice, and built and staged all
my wrappers as a Python part. 'core' already has Python3, so it isn't
bloating the snap size. And it makes it a doddle to manipulate json, yaml
or ini files, when this sort of thing requires an expert to do correctly in
bash or dash.

(but look at 'jq' if you insist on shell scripts - it seemed very helpful
for dealing with json)

-- 
Stuart Bishop <[email protected]>
-- 
Snapcraft mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to