BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Application config files
- Subject: [Discuss] Application config files
- From: gaf at gapps.blu.org (Jerry Feldman)
- Date: Fri, 12 Jul 2019 14:34:06 -0400
- In-reply-to: <20190712140720.38215f7c@mydesk.domain.cxm>
- References: <CAEvgogF9s200fVh_HaO2dHnmVV94vJ4gSSaWWOCj+YwN1mFMGw@mail.gmail.com> <20190712174001.zf5gvwbpfsqlkqjh@randomstring.org> <20190712140720.38215f7c@mydesk.domain.cxm>
.ini does the job. I'll stick with it. On Fri, Jul 12, 2019 at 2:08 PM Steve Litt <slitt at troubleshooters.com> wrote: > On Fri, 12 Jul 2019 13:40:01 -0400 > Dan Ritter <dsr at randomstring.org> wrote: > > > Jerry Feldman wrote: > > > I have an application that I wrote where I am using a .ini style > > > file for config. I chose that as an afterthought but maybe JSON, > > > YAML, or TOML might be better formats. I set it up that way because > > > I thought my target audience might be more familiar with .ini. > > > Right now the code has no capability to save the preferences, but > > > that should be an option, so a more Linuxish config file might be > > > better. I'm personally very comfortable with both YAML and JSON. > > > Opinions? (My code is Python3/GTK3). > > > > It usually doesn't matter. > > > > If it's short, .ini is perfectly fine. > > > > If it's a potentially long config file, the best thing you can > > do is make it capable of reading a directory worth of files > > to include in the main config, so that replacing a small bit > > without affecting the rest is easy. > > > > include /opt/application/config.d/* > > I agree with Dan. Here's why... > > JSON is out from the get-go: It's not meant to be read and written by > humans. > > YAML is absolutely wonderful, best thing around, and I use it a lot on > programs used by me, myself and I. But YAML is beyond the expertise of > many people, and the absence of a colon could screw everything up. > > Ini files suck but everyone understands them, and as Dan said, if you > want your hierarchy to go deeper than 2 levels, refer to a directory > full of ini files. > > If I'd seen this thread 3 years ago, I'd have structured the data for > UMEN2 as a tree of ini files. > > http://www.troubleshooters.com/projects/umenu2/ > > > SteveT > > Steve Litt > July 2019 featured book: Troubleshooting Techniques > of the Successful Technologist > http://www.troubleshooters.com/techniques > _______________________________________________ > Discuss mailing list > Discuss at blu.org > http://lists.blu.org/mailman/listinfo/discuss > -- Jerry Feldman <gaf at blu.org> Treasurer, Boston Linux and Unix http://www.blu.org
- References:
- [Discuss] Application config files
- From: gaf.linux at gmail.com (Jerry Feldman)
- [Discuss] Application config files
- From: dsr at randomstring.org (Dan Ritter)
- [Discuss] Application config files
- From: slitt at troubleshooters.com (Steve Litt)
- [Discuss] Application config files
- Prev by Date: [Discuss] Application config files
- Next by Date: [Discuss] Application config files
- Previous by thread: [Discuss] Application config files
- Next by thread: [Discuss] Application config files
- Index(es):