mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
0e2c4266fa
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7831 b45a01b8-16f6-495d-af2f-9b41ad6348cc
33 lines
1.2 KiB
Python
Executable File
33 lines
1.2 KiB
Python
Executable File
#!/usr/bin/python
|
|
|
|
# Requires packages
|
|
# python-launchpad-integration
|
|
# python-launchpadlib
|
|
|
|
from launchpadlib.launchpad import Launchpad
|
|
PPAOWNER = "csoler-users" #the launchpad PPA owener. It's usually the first part of a PPA. Example: in "webupd8team/vlmc", the owener is "webupd8team".
|
|
|
|
distribs = ['jaunty','karmic','lucid','maverick','natty']
|
|
archs = ['i386','amd64']
|
|
ppas = ['retroshare','retroshare-snapshots']
|
|
total = 0
|
|
|
|
|
|
for PPA in ppas:
|
|
for distrib in distribs:
|
|
for arch in archs:
|
|
desired_dist_and_arch = 'https://api.edge.launchpad.net/devel/ubuntu/' + distrib + '/' + arch
|
|
#here, edit "maverick" and "i386" with the Ubuntu version and desired arhitecture
|
|
|
|
cachedir = "~/.launchpadlib/cache/"
|
|
lp_ = Launchpad.login_anonymously('ppastats', 'edge', cachedir, version='devel')
|
|
owner = lp_.people[PPAOWNER]
|
|
archive = owner.getPPAByName(name=PPA)
|
|
|
|
for individualarchive in archive.getPublishedBinaries(status='Published',distro_arch_series=desired_dist_and_arch):
|
|
print PPA + "\t" + arch + "\t" + individualarchive.binary_package_version + "\t" + str(individualarchive.getDownloadCount())
|
|
total += individualarchive.getDownloadCount()
|
|
|
|
print "Total downloads: " + str(total)
|
|
|