complete editability of weewx.conf

7 views
Skip to first unread message

Vince Skahan

unread,
1:10 PM (9 hours ago) 1:10 PM
to weewx-development
Would some kind of utility to permit simple edits of 'any' item in weewx.conf be of any value to think about ?

Something like "weectl edit config" or the like (for discussion purposes) ?

# edit weewx.conf
weectl edit config --set "[StdRestful][[MQTT]]" --key "log_success" --value "true"

or

# edit a skin's skin.conf
weectl edit skinConfig --skin "Belchertown" --set "[Extras]" --key "belchertown_debug" --value "1"


I know simply telling them 'edit the file dude' of course works, but it might be helpful for scriptability if there was a way to automate add/edit/comment/uncomment things programmatically.  The use of configobj makes this really hard to do without some wrapper utility being cooked up.

I did think about some alternate ways:
  • convert the .conf in configobj format to JSON or YAML
  • edit thataway
  • convert it back to configobj format
But that would be ugly at best and likely would lose any comments from the .conf file.

No short-term need, but thought I'd ask if it might be a longterm stretch goal (?)




Peter Fletcher

unread,
6:56 PM (3 hours ago) 6:56 PM
to weewx-development
Other than enhancing scriptability - largely, I would imagine for initial installations - I am not sure that I see the value of this, particularly given the very substantial amount of work involved in implementing it. I think that it is easier for the user who isn't a unix guru to go through the well documented .conf file and identify and make the changes that (s)he needs. For those who are unix gurus, and are used to (and possible even like!) its complex command line syntax, it might be faster to make a single change this way, but you frequently aren't just making a single change.
Just my 2 cents!

Reply all
Reply to author
Forward
0 new messages