Debian Bug report logs - #647565
madison.cgi: make it produce an easier to parse output

Package: qa.debian.org; Maintainer for qa.debian.org is debian-qa@lists.debian.org;

Reported by: Sandro Tosi <morph@debian.org>

Date: Fri, 4 Nov 2011 00:18:02 UTC

Severity: wishlist

Tags: patch

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Fri, 04 Nov 2011 00:18:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sandro Tosi <morph@debian.org>:
New Bug report received and forwarded. Copy sent to debian-qa@lists.debian.org. (Fri, 04 Nov 2011 00:18:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Sandro Tosi <morph@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: madison.cgi: make it produce an easier to parse output
Date: Fri, 04 Nov 2011 00:41:09 +0100
Package: qa.debian.org
Severity: normal

Hello,
currently madison.cgi (and it's rmadison command friend) doesn't emit an
easy-to-parse output: please enable it. Something like xml, json, yaml, whatever
that's easy from a programming language to parse and understand.

Regards,
Sandro

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash




Severity set to 'wishlist' from 'normal' Request was from Bart Martens <bartm@debian.org> to control@bugs.debian.org. (Sat, 05 Nov 2011 01:45:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Wed, 09 Nov 2011 11:51:27 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Wilk <jwilk@debian.org>:
Extra info received and forwarded to list. Copy sent to debian-qa@lists.debian.org. (Wed, 09 Nov 2011 11:51:36 GMT) Full text and rfc822 format available.

Message #12 received at 647565@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: Sandro Tosi <morph@debian.org>, 647565@bugs.debian.org
Subject: Re: Bug#647565: madison.cgi: make it produce an easier to parse output
Date: Wed, 9 Nov 2011 12:48:34 +0100
Hi Sandro,

* Sandro Tosi <morph@debian.org>, 2011-11-04, 00:41:
>currently madison.cgi (and it's rmadison command friend) doesn't emit 
>an easy-to-parse output: please enable it. yaml, whatever that's easy 
>from a programming language to parse and understand.

Why parsing the current output is hard?

-- 
Jakub Wilk




Information forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Wed, 09 Nov 2011 12:22:35 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Tagliamonte <paultag@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to debian-qa@lists.debian.org. (Wed, 09 Nov 2011 12:23:08 GMT) Full text and rfc822 format available.

Message #17 received at submit@bugs.debian.org (full text, mbox):

From: Paul Tagliamonte <paultag@ubuntu.com>
To: Sandro Tosi <morph@debian.org>, 647565@bugs.debian.org
Cc: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#647565: madison.cgi: make it produce an easier to parse output
Date: Wed, 9 Nov 2011 07:09:09 -0500
[Message part 1 (text/plain, inline)]
On Thu, Nov 3, 2011 at 7:41 PM, Sandro Tosi <morph@debian.org> wrote:
> Package: qa.debian.org
> Severity: normal
>
> Hello,
> currently madison.cgi (and it's rmadison command friend) doesn't emit an
> easy-to-parse output: please enable it. Something like xml, json, yaml, whatever
> that's easy from a programming language to parse and understand.

I'd kindly invite you to reconsider that -

as far as this stuff goes, that's much easier for a machine to parse
then JSON, YAML or XML.

However, I can understand why you'd need that, for instance if you
don't want to write your own parser.

It's early-o-clock here, but I whipped up a script in python for you,
that will take stdin from rmadion and translate it to JSON.

Keep in mind, it's early, I don't have coffee and I spent about 4
minutes on this.

If there are bugs, I'll try to fix them when I have some time, but I
can't be supporting this mess.

Debts payable in Scotch.

Find script attached,
Cheers (and good luck)

-Paul

>
> Regards,
> Sandro
>
> -- System Information:
> Debian Release: wheezy/sid
>  APT prefers unstable
>  APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
>
>
>
> --
> To UNSUBSCRIBE, email to debian-qa-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/20111103234109.22862.54402.reportbug@zion.matrix.int
>
>



-- 
All programmers are playwrights, and all computers are lousy actors.

#define sizeof(x) rand()
:wq
[test.py (text/x-python, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Wed, 09 Nov 2011 12:23:42 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Tagliamonte <paultag@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to debian-qa@lists.debian.org. (Wed, 09 Nov 2011 12:24:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Wed, 09 Nov 2011 13:24:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sandro Tosi <morph@debian.org>:
Extra info received and forwarded to list. Copy sent to debian-qa@lists.debian.org. (Wed, 09 Nov 2011 13:24:08 GMT) Full text and rfc822 format available.

Message #27 received at 647565@bugs.debian.org (full text, mbox):

From: Sandro Tosi <morph@debian.org>
To: Sandro Tosi <morph@debian.org>, 647565@bugs.debian.org
Subject: Re: Bug#647565: madison.cgi: make it produce an easier to parse output
Date: Wed, 9 Nov 2011 14:21:51 +0100
On Wed, Nov 9, 2011 at 12:48, Jakub Wilk <jwilk@debian.org> wrote:
> Hi Sandro,
>
> * Sandro Tosi <morph@debian.org>, 2011-11-04, 00:41:
>>
>> currently madison.cgi (and it's rmadison command friend) doesn't emit an
>> easy-to-parse output: please enable it. yaml, whatever that's easy from a
>> programming language to parse and understand.
>
> Why parsing the current output is hard?

It's not hard, but it's not even that much easily machine parsable as
some other formats. Also, every clients needing to parse information,
needs to implement its own parser, instead of getting data alraedy
structurated.

It's not i'm stuck if this is not fixed, the parser it's at [1], still
I won't call it that optimal.

[1] http://anonscm.debian.org/gitweb/?p=reportbug/reportbug.git;a=commitdiff;h=211802564a16717f29b7de8208841662b127cbd5

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi




Information forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Wed, 09 Nov 2011 13:39:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexander Wirt <formorer@debian.org>:
Extra info received and forwarded to list. Copy sent to debian-qa@lists.debian.org. (Wed, 09 Nov 2011 13:39:11 GMT) Full text and rfc822 format available.

Message #32 received at 647565@bugs.debian.org (full text, mbox):

From: Alexander Wirt <formorer@debian.org>
To: Sandro Tosi <morph@debian.org>, 647565@bugs.debian.org
Subject: Re: Bug#647565: madison.cgi: make it produce an easier to parse output
Date: Wed, 9 Nov 2011 14:36:42 +0100
Sandro Tosi schrieb am Mittwoch, den 09. November 2011:

Hi,
> > * Sandro Tosi <morph@debian.org>, 2011-11-04, 00:41:
> >>
> >> currently madison.cgi (and it's rmadison command friend) doesn't emit an
> >> easy-to-parse output: please enable it. yaml, whatever that's easy from a
> >> programming language to parse and understand.
> >
> > Why parsing the current output is hard?
> 
> It's not hard, but it's not even that much easily machine parsable as
> some other formats. Also, every clients needing to parse information,
> needs to implement its own parser, instead of getting data alraedy
> structurated.
> 
> It's not i'm stuck if this is not fixed, the parser it's at [1], still
> I won't call it that optimal.
Some time ago I did some work on madison.cgi and afair a json/yaml/whatever
output should be possible. Maybe I will fine some time later to implement
that.

Alex
-- 
Alexander Wirt, formorer@formorer.de 
CC99 2DDD D39E 75B0 B0AA  B25C D35B BC99 BC7D 020A




Information forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Wed, 09 Nov 2011 22:27:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexander Wirt <formorer@formorer.de>:
Extra info received and forwarded to list. Copy sent to debian-qa@lists.debian.org. (Wed, 09 Nov 2011 22:27:07 GMT) Full text and rfc822 format available.

Message #37 received at 647565@bugs.debian.org (full text, mbox):

From: Alexander Wirt <formorer@formorer.de>
To: Sandro Tosi <morph@debian.org>, 647565@bugs.debian.org
Subject: Re: Bug#647565: madison.cgi: make it produce an easier to parse output
Date: Wed, 9 Nov 2011 23:21:51 +0100
[Message part 1 (text/plain, inline)]
Sandro Tosi schrieb am Wednesday, den 09. November 2011:

> On Wed, Nov 9, 2011 at 12:48, Jakub Wilk <jwilk@debian.org> wrote:
> > Hi Sandro,
> >
> > * Sandro Tosi <morph@debian.org>, 2011-11-04, 00:41:
> >>
> >> currently madison.cgi (and it's rmadison command friend) doesn't emit an
> >> easy-to-parse output: please enable it. yaml, whatever that's easy from a
> >> programming language to parse and understand.
> >
> > Why parsing the current output is hard?
> 
> It's not hard, but it's not even that much easily machine parsable as
> some other formats. Also, every clients needing to parse information,
> needs to implement its own parser, instead of getting data alraedy
> structurated.
> 
> It's not i'm stuck if this is not fixed, the parser it's at [1], still
> I won't call it that optimal.
You may want to try the attached patch for madison.cgi. It adds a yaml parameter which produces an output like:

 perl madison.cgi package=keepalived yaml=1
Content-Type: text/plain

--- 
keepalived: 
  1:1.1.20-1: 
    squeeze: 
      - source
      - amd64
      - armel
      - i386
      - ia64
      - mips
      - mipsel
      - powerpc
      - s390
      - sparc
  1:1.2.2-1: 
    sid: 
      - source
      - amd64
      - armel
      - i386
      - ia64
      - mips
      - mipsel
      - powerpc
      - s390
      - sparc
    wheezy: 
      - source
      - amd64
      - armel
      - i386
      - ia64
      - mips
      - mipsel
      - powerpc
      - s390
      - sparc

Adding other formats like json would be trivial (I just need the relevant libs like libjson-perl installed on quantz).

Alex


[rmadison-yaml.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Mon, 26 Dec 2011 04:24:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Geissert <geissert@debian.org>:
Extra info received and forwarded to list. Copy sent to debian-qa@lists.debian.org. (Mon, 26 Dec 2011 04:24:05 GMT) Full text and rfc822 format available.

Message #42 received at 647565@bugs.debian.org (full text, mbox):

From: Raphael Geissert <geissert@debian.org>
To: Alexander Wirt <formorer@formorer.de>, 647565@bugs.debian.org, 647565-owner@bugs.debian.org
Subject: Re: Bug#647565: madison.cgi: make it produce an easier to parse output
Date: Sun, 25 Dec 2011 15:42:23 -0600
Alexander Wirt wrote:
>> > * Sandro Tosi <morph@debian.org>, 2011-11-04, 00:41:
>> >> currently madison.cgi (and it's rmadison command friend) doesn't emit
>> >> an easy-to-parse output: please enable it. yaml, whatever that's easy
>> >> from a programming language to parse and understand.

How about consuming a web service?
I've been thinking about exporting a few things via xml-rpc, but soap is 
already used by the BTS and the PTS so I might just stick to that.

I don't think yaml or any other representation is appropriate. It would only 
hide the parsing while the querying is still custom-made.

> You may want to try the attached patch for madison.cgi. It adds a yaml
> parameter which produces an output like:

Huh, an exported "Dump," creepy. ;)

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net




Message sent on to Sandro Tosi <morph@debian.org>:
Bug#647565. (Mon, 26 Dec 2011 04:30:03 GMT) Full text and rfc822 format available.

Message #45 received at 647565-submitter@bugs.debian.org (full text, mbox):

From: Raphael Geissert <atomo64@gmail.com>
To: 647565-submitter@bugs.debian.org
Subject: Re: Bug#647565: madison.cgi: make it produce an easier to parse output
Date: Sun, 25 Dec 2011 22:26:45 -0600
Oops, -owner doesn't exist. I meant -submitter.
Please reply to the br.

Alexander Wirt wrote:
>> > * Sandro Tosi <morph@debian.org>, 2011-11-04, 00:41:
>> >> currently madison.cgi (and it's rmadison command friend) doesn't emit
>> >> an easy-to-parse output: please enable it. yaml, whatever that's easy
>> >> from a programming language to parse and understand.

How about consuming a web service?
I've been thinking about exporting a few things via xml-rpc, but soap is 
already used by the BTS and the PTS so I might just stick to that.

I don't think yaml or any other representation is appropriate. It would only 
hide the parsing while the querying is still custom-made.

> You may want to try the attached patch for madison.cgi. It adds a yaml
> parameter which produces an output like:

Huh, an exported "Dump," creepy. ;)

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net

-----------------------------------------
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net




Information forwarded to debian-bugs-dist@lists.debian.org, debian-qa@lists.debian.org:
Bug#647565; Package qa.debian.org. (Mon, 26 Dec 2011 08:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sandro Tosi <morph@debian.org>:
Extra info received and forwarded to list. Copy sent to debian-qa@lists.debian.org. (Mon, 26 Dec 2011 08:33:04 GMT) Full text and rfc822 format available.

Message #50 received at 647565@bugs.debian.org (full text, mbox):

From: Sandro Tosi <morph@debian.org>
To: Raphael Geissert <geissert@debian.org>, 647565@bugs.debian.org
Cc: Alexander Wirt <formorer@formorer.de>
Subject: Re: Bug#647565: madison.cgi: make it produce an easier to parse output
Date: Mon, 26 Dec 2011 09:28:15 +0100
On Sun, Dec 25, 2011 at 22:42, Raphael Geissert <geissert@debian.org> wrote:
> How about consuming a web service?

From my POV that's ok

> I don't think yaml or any other representation is appropriate. It would only
> hide the parsing while the querying is still custom-made.

Many other services just export data in that format (or similarly
structured text formats), so I don't think it's so "inappropriate".

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi




Added tag(s) patch. Request was from Paul Wise <pabs@debian.org> to control@bugs.debian.org. (Sun, 21 Apr 2013 06:03:04 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 01:43:31 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.