Date: Thu, 14 Aug 2014 14:22:08 -0400 From: John Baldwin <jhb@freebsd.org> To: "Simon J. Gerraty" <sjg@juniper.net> Cc: Marcel Moolenaar <marcel@freebsd.org>, Phil Shafer <phil@juniper.net>, John-Mark Gurney <jmg@funkthat.com>, arch@freebsd.org, Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-arch <freebsd-arch@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com> Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML Message-ID: <201408141422.08265.jhb@freebsd.org> In-Reply-To: <20140814171647.2241D580A2@chaos.jnpr.net> References: <20140814052648.GM2737@kib.kiev.ua> <94A47A7D-89C9-4504-B669-2A5EDA80373B@bsdimp.com> <20140814171647.2241D580A2@chaos.jnpr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, August 14, 2014 1:16:47 pm Simon J. Gerraty wrote: > > >My question for people advocating this method: Why not require all = > >commands > >that generate this kind of output to support a standard command line = > >option > > That's basically what we did in Junos, except the -X option currently > just means output XML. > That worked fine for the limited number of bsd apps that we frobbed, > but pretty hard to assert that it could be expanded to all apps. > > Thus I think Phil was looking for a more generic solution. > > I think your suggestion could work fine. > Since (I think) Phil mentioned libxo being able to check options, > it should be ok to run an app with an option like: > > --libxo-is-supported > > that's guaranteed to not conflict with any existing option. > Any app that hasn't been converted will choke and die, any that has will > exit happy. > > You could add other --libxo-* options to control output - if environment > variables are not considered desirable I vote for this. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408141422.08265.jhb>