Comment 57 for bug 139855

Revision history for this message
Darxus (darxus) wrote :

This stuff is amazingly badly documented. This is what I ended up doing to get the hit counts for the packages in the first ppa (number 0) belonging to the spamassassin group:

apt-get install ubuntu-dev-tools
lp-shell
sa = lp.people['spamassassin']
ppa = sa.ppas[0]
desired_dist_and_arch = "https://api.edge.launchpad.net/devel/ubuntu/maverick/i386"
for binarypackage in ppa.getPublishedBinaries(distro_arch_series=desired_dist_and_arch):
         print binarypackage.binary_package_name + "\t" + binarypackage.binary_package_version + "\t" + str(binarypackage.getDownloadCount())

Once you're in lp-shell, and have ppa defined, you can just type "sa.ppas[0]" to get it to tell you which ppa corresponds to that number, so you can look through them to find the right one:

>>> sa.ppas[0]
<archive at https://api.edge.launchpad.net/1.0/~spamassassin/+archive/spamassassin-daily>

Also, very importantly, I could only get lp-shell working on my local machine running X with a graphical browser. The authentication stuff through the text browsers lynx and links didn't work.

Is it really so hard to just put these hit counts on a freaking web page somewhere?