CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#175 - Support XML output for the portdb

Attached to Project: CRUX
Opened by Tilman Sauerbeck (tilman) - Saturday, 24 March 2007, 12:07 GMT
Last edited by Lucas Hazel (nipuL) - Saturday, 13 June 2009, 00:41 GMT
Task Type Feature Request
Category website
Status Closed
Assigned To Lucas Hazel (nipuL)
Operating System CRUX
Severity Low
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Till,
can we have XML output of search results in the port db?

I\'d like to see http://crux.nu/portdb/?q=xine-lib&a=search&fmt=xml
return something like

<result>
<name>xine-lib</name>
<repo>blah</name>
<downloadcommand>httpup .. </downloadcommand>
</result>

<!-- more <result> tags here -->

That would make it easy for scripts to query the port db, as XML is easy to parse.
This task depends upon

Closed by  Lucas Hazel (nipuL)
Saturday, 13 June 2009, 00:41 GMT
Reason for closing:  Implemented
Additional comments about closing:  This has just gone live on the official portdb
Comment by Till Biedermann (tillb) - Sunday, 06 May 2007, 17:13 GMT
  • Field changed: Status (Researching → Requires testing)
  • Field changed: Percent Complete (0% → 90%)
Comment by Tilman Sauerbeck (tilman) - Tuesday, 08 May 2007, 15:16 GMT
Works great for me :)
Comment by Jose V Beneyto (sepen) - Tuesday, 08 May 2007, 15:41 GMT
An initial-premature-example writting in perl:
http://mikeux.dyndns.org/crux/tools/portsearch

Example usage:
$ ./portsearch
usage: ./portsearch [port]
$ ./portsearch quake
proquake (nym) # httpup sync http://members.optushome.com.au/dfmarks/crux/ports#proquake proquake
quake (jdolan) # httpup sync http://jdolan.dyndns.org/jaydolan/ports#quake quake
quake2 (jdolan) # httpup sync http://jdolan.dyndns.org/jaydolan/ports#quake2 quake2
quake2-icculus (jdolan) # httpup sync http://jdolan.dyndns.org/jaydolan/ports#quake2-icculus quake2-icculus
quake2forge (jdolan) # httpup sync http://jdolan.dyndns.org/jaydolan/ports#quake2forge quake2forge
quake2world (ndeubert) # httpup sync http://nd.dyndns.org:81/crux/ports#quake2world quake2world
quake3 (jdolan) # httpup sync http://jdolan.dyndns.org/jaydolan/ports#quake3 quake3
quake3-icculus (lithium) # httpup sync http://www.poolofrandomness.com/crux#quake3-icculus quake3-icculus
quake4 (lithium) # httpup sync http://www.poolofrandomness.com/crux#quake4 quake4
quakeforge (jdolan) # httpup sync http://jdolan.dyndns.org/jaydolan/ports#quakeforge quakeforge
Comment by Lucas Hazel (nipuL) - Friday, 08 June 2007, 05:14 GMT
I also have written a script for searching the portdb. XML output is a great idea, but it should provide the same information as the HTML output. For example, the HTML output gives links to the Pkgfile .footprint and .md5sum. My script uses these to gather as much information about a port as possible.

XML output for the index and repo actions would be nice aswell.
Comment by Jose V Beneyto (sepen) - Monday, 18 June 2007, 08:28 GMT
Im writing a new perl script from 0, and now Im using other perl module more generic XML::Parser (also available in portdb), seems that XML::Simple don't works for me when I try to show duplicated ports (see 'quake' search from my previous comment, only appears one time, error).

These are the first revisions of my new code
http://mikeux.dyndns.org:8000/crux/browser/trunk/tools/portsearch
Comment by Till Biedermann (tillb) - Monday, 18 June 2007, 20:20 GMT
> XML output is a great idea, but it should provide the same
> information as the HTML output. For example, the HTML output
> gives links to the Pkgfile .footprint and .md5sum
>

Done - but works only for httpup.
Is there a way to access these files from rsync-repos via http? In former times there were httpup-clones for core, opt and contrib. Are they still there or is there no need for them anymore?
Comment by Jose V Beneyto (sepen) - Tuesday, 19 June 2007, 22:37 GMT
This script works fine for me. (perl XML::Parser)
Comment by Lucas Hazel (nipuL) - Wednesday, 20 June 2007, 03:14 GMT
It would be nice if the rsync repos had this information. I always wondered why the httpup repos were taken down. This sort of information would be nice as I could finally have the ports system I always wanted, that is one that only downloads ports I need, rather than an entire repo.

Also, it would be super awesome if you could do xml output for the other actions too. :)

?a=index
?a=repo&q=core
Comment by Jose V Beneyto (sepen) - Friday, 09 November 2007, 15:25 GMT
Imo, also other actions would be super-super. x:)
Here, a more complete version of my script, 'portdb-search'

$ time ./portdb-search mplayer
....
real 0m0.678s
user 0m0.168s
sys 0m0.036s

See result report in atachments for more about output format)
Comment by Jose V Beneyto (sepen) - Friday, 09 November 2007, 16:41 GMT
Sorry, fixed some issues in atachments
Comment by Lucas Hazel (nipuL) - Friday, 01 August 2008, 11:55 GMT
This one was assigned to me during a recent casual IRC meeting.

Here is the result,

http://crux.nu/~lucas/portdb/

XML output is produced by adding f=xml to the parameters, for example,

http://crux.nu/~lucas/portdb/?a=repo&q=core&f=xml

Loading...