[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Output of dpkg-scanpackages as XML



On Wednesday 05 January 2005 22:21, William Ballard wrote:

> This is trivial with grep-dctrl and sed.  For example:

Thanks, for making me aware of grep-dctrl.

> echo '<packages><entry>'
> zcat /a/dists/latest/binary-i386/Packages.gz | \
>   grep-dctrl -sPackage,Version . | \
>   sed -r -e 's/([^:]+):(.+)/<\1>\2<\/\1>/' \
>   -e 's/^$/<\/entry><entry>/' | head -n-1;
> echo '</entry></packages>'

Thanks so far. I think I'll write my own PHP script that will output a more 
structured XML document, so that I can create hyperlinks from the packages in 
the 'Depends' field and parse the quasi field 'Homepage'.

Frank
-- 
Nunc vino pellite curas! -- Horaz



Reply to: