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

Realtime PHP apt file (Packages.gz) parser



Hi,

Just in case someone here needs a small PHP script for generating HTML 
summaries from apt repository files ('apt-ftparchive' output, ie. Packages.gz 
and Source.gz) in realtime:

  http://iki.fi/elonencode/parse-apt-files.inc

For example output see:

  http://iki.fi/elonen/code/unofficial-debs/

Features:

 + small: one file, 140 lines
 + parses files in realtime (easy to use but only
   suitable for relatively small repositories)
 + produces XHTML 1.0 Strict by default
 + easily extendable: parses all fields into associative arrays
 + convert HTTP URLs in description into links
 + shows files sizes in human-friendly format
 + released in Public Domain

I wouldn't be surprised if others had made similar scripts already but didn't 
find any and thus wrote one anyway.

- Jarno



Reply to: