From owner-freebsd-current@FreeBSD.ORG Mon Mar 2 08:53:31 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49535E15; Mon, 2 Mar 2015 08:53:31 +0000 (UTC) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 14908198; Mon, 2 Mar 2015 08:53:31 +0000 (UTC) Received: by padfb1 with SMTP id fb1so3332361pad.7; Mon, 02 Mar 2015 00:53:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=muWHXxLBAfbPEnDiqxHLw1UI8q6dCOtrQeGgiqFdcno=; b=rIkLibTiVKCa+pbZls46RQ/uR/fOJLXSR6cpS4QMrBQlC846Kw7RKMt6wqSDfyOanX YXvnWP4XYe6TjLF9O9d+DD5PrztDNy5HNj3hjFLkzJL6ghni7rb8RzSNEutCg9WQbBEs Wv9MBw7I//8LQF4XlzuRHwOmKYI9tMRK/ceAwmUQ1oofDECu0DBzjHGrkkykJh7yjYbR Azr7a+CiqKrZMFMJ+3R2r0AZMoXuai3d3M7osF3wdY8Z3pTdvWYaUyAhD8IF20LC4xyy WDVRgqC73tjoC7PAnu7BgW7SJIOWsOehtqGqXbKViTgbtUJpgWU9IILnEPY/5hgGKovb fv4Q== X-Received: by 10.70.128.15 with SMTP id nk15mr44552452pdb.121.1425286410639; Mon, 02 Mar 2015 00:53:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.66.237.39 with HTTP; Mon, 2 Mar 2015 00:53:10 -0800 (PST) In-Reply-To: <54F3C134.5080207@freebsd.org> References: <54F31510.7050607@hot.ee> <54F34B6E.2040809@astrodoggroup.com> <54F35F29.4000603@astrodoggroup.com> <54F36431.30506@freebsd.org> <54F3C134.5080207@freebsd.org> From: Arseny Nasokin Date: Mon, 2 Mar 2015 12:53:10 +0400 Message-ID: Subject: Re: Massive libxo-zation that breaks everything To: Allan Jude Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 08:53:31 -0000 On 2 March 2015 at 04:47, Allan Jude wrote: > On 2015-03-01 19:20, Arseny Nasokin wrote: > > On 1 March 2015 at 22:10, Allan Jude wrote: > > > >> On 2015-03-01 13:49, Harrison Grundy wrote: > >>> Thanks! > >>> > >>> That does seem useful, but I'm not sure I see the reasoning behind > >>> putting into base, over a port or package, since processing XML in base > >>> is a pain, and it can't serve up JSON or HTML without additional > >>> utilities anyway. > >>> > >>> (If I'm reviving a long-settled thing, let me know and I'll drop it. > I'm > >>> trying to understand the use case for this.) > >>> > >>> --- Harrison > >>> > >>> On 03/01/15 10:31, Craig Rodrigues wrote: > >>>> On Sun, Mar 1, 2015 at 9:25 AM, Harrison Grundy < > >>>> harrison.grundy@astrodoggroup.com> wrote: > >>>> > >>>>> > >>>>> > >>>>> If someone could summarize what this is, I'd greatly appreciate it. > >>>>> > >>>> > >>>> > https://lists.freebsd.org/pipermail/freebsd-arch/2014-July/015633.html > >>>> _______________________________________________ > >>>> freebsd-current@freebsd.org mailing list > >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >>>> To unsubscribe, send any mail to " > >> freebsd-current-unsubscribe@freebsd.org" > >>>> > >>> _______________________________________________ > >>> freebsd-current@freebsd.org mailing list > >>> http://lists.freebsd.org/mailman/listinfo/freebsd-current > >>> To unsubscribe, send any mail to " > >> freebsd-current-unsubscribe@freebsd.org" > >>> > >> > >> I think you're missing the important bit here. > >> > >> This isn't about adding a parser for anything, this is about making the > >> tools in base, like netstat, wc, uptime, etc, output in JSON or XML, so > >> you can use the data programmatically. > >> > >> Your scripts no longer have to rely on awk/sed/grep magic to get a > >> specific bit of information out of the uptime command, the command can > >> just output the data in a structured machine readable format. > >> > >> I am not sure how you can put netstat into the ports tree. > >> > >> > >> -- > >> Allan Jude > >> > >> > > Hi, > > > > Do we have command-line tools in base which work with XML/JSON from stdin > > or file? > > > > -- Eir Nym > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to " > freebsd-current-unsubscribe@freebsd.org" > > > > Not really, although there are libraries for such (bsdxml, libucl which > can read JSON) in base. > > I am working on a tool that can do some of this: > > https://github.com/allanjude/uclcmd/ > > -- > Allan Jude > > Allan, What do you think about tools like plutil(1) or defaults(1) from Mac OS X. Plists are dict-like structures (XML and JSON too). -- Eir Nym