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

Re: Output of dpkg-scanpackages as XML



On Thursday 06 January 2005 02:14, Sven Mueller wrote:

> I would appreciate it if you could make your scripts available once they
> are (nearly;-)) finished.

Ok, I nearly finished it :) It is written in Python and is called "dctrl2xml".
Binary and source packages are apt-getable from my private repository:
 http://www.thomas-alfeld.de/frank/download/debian/

Once installed, one can type:
 ~$ apt-cache show hello | dctrl2xml 
 This prints an XML representaion of the package 'hello' to stdout. 

 ~$ dctrl2xml -f <packages_file>
 This prints all packages listed in file <package_file> as XML to stdout.
 <package_file> may be compressed with gzip/bzip2.

 ~$ dctrl2xml --help
 Prints the help message.

If there are non-ascii encoded chars in dctrl2xml's input the character 
encoding must be specified:
 ~$ apt-cache show maint-guide-de | dctrl2xml -e latin1
The default encoding is utf-8.

I could successfully convert sid's binary-i386/source package files into XML. 
However, because dctrl2xml builds up a dom tree of all packages in these 
files, this is horribly slow. There may also be some cases where dctrl2xml 
will fail.

Comments about the script and the package are appreciated.

Grüße,
Frank

-- 
Nunc vino pellite curas! -- Horaz



Reply to: