From: Jakub Narebski <jnareb@gmail.com>
To: Julian Phillips <julian@quantumfyre.co.uk>
Cc: git@vger.kernel.org, Eric Raymond <esr@thyrsus.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC/PATCH 2/3] add a library of code for producing structured output
Date: Sun, 11 Apr 2010 08:46:46 -0700 (PDT) [thread overview]
Message-ID: <m3bpdqgfha.fsf@localhost.localdomain> (raw)
In-Reply-To: <20100411113733.80010.3767.julian@quantumfyre.co.uk>
Julian Phillips <julian@quantumfyre.co.uk> writes:
> Add a library that allows commands to produce structured output in any
> of a range of formats using a single API.
>
> The API includes an OPT_OUTPUT and handle_output_arg so that the
> option handling for different commands will be as similar as possible.
>
> At the moment JSON and XML output options are available - though the
> XML output is _very_ rudimentary.
>
> Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
> ---
> Makefile | 3 +
> output-json.c | 128 ++++++++++++++++++++++++++++++++++
> output-xml.c | 68 ++++++++++++++++++
> output.c | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> output.h | 71 +++++++++++++++++++
> 5 files changed, 482 insertions(+), 0 deletions(-)
> create mode 100644 output-json.c
> create mode 100644 output-xml.c
> create mode 100644 output.c
> create mode 100644 output.h
How about some technical documentation, in the form of
Documentation/technical/api-structured-output.txt (or something like
that), describing how this API should be used.
How about some tests? Note that you need to take care of commits that
are encoded in encoding other than utf-8 (but with 'encoding' header,
so you know what encoding it is), and of filenames that are invalid
UTF-8 (and their encoding is unknown in general: they are raw binary
data). You need to take care of non-ASCII characters, and of special
characters (like '"', SPC, TAB, LF, '\') in commits and in filenames.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2010-04-11 15:46 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-11 11:37 [RFC/PATCH 0/3] JSON/XML output for scripting interface Julian Phillips
2010-04-11 11:37 ` [RFC/PATCH 1/3] strbuf: Add strbuf_vaddf function Julian Phillips
2010-04-11 12:42 ` Erik Faye-Lund
2010-04-11 12:59 ` Julian Phillips
2010-04-11 11:37 ` [RFC/PATCH 2/3] add a library of code for producing structured output Julian Phillips
2010-04-11 12:51 ` Erik Faye-Lund
2010-04-11 13:03 ` Julian Phillips
2010-04-11 15:46 ` Jakub Narebski [this message]
2010-04-11 18:16 ` Junio C Hamano
2010-04-11 18:26 ` Sverre Rabbelier
2010-04-11 19:21 ` Julian Phillips
2010-04-11 20:34 ` Jakub Narebski
2010-04-11 20:46 ` Julian Phillips
2010-04-11 20:57 ` Eric Raymond
2010-04-11 11:37 ` [RFC/PATCH 3/3] status: add support for " Julian Phillips
2010-04-11 15:48 ` [RFC/PATCH 0/3] JSON/XML output for scripting interface Sverre Rabbelier
2010-04-11 17:30 ` Julian Phillips
2010-04-11 17:34 ` Sverre Rabbelier
2010-04-11 17:45 ` Julian Phillips
2010-04-11 17:50 ` Sverre Rabbelier
2010-04-11 22:22 ` Jon Seymour
2010-04-11 22:34 ` Eric Raymond
2010-04-11 23:25 ` Jon Seymour
2010-04-11 23:30 ` Julian Phillips
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3bpdqgfha.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=esr@thyrsus.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=julian@quantumfyre.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).