mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 02:50:12 +01:00
Some work in progress on download stats
This commit is contained in:
parent
44de41faae
commit
ddecd8e9cc
30
common.py
30
common.py
@ -782,3 +782,33 @@ def prepare_source(vcs, app, build, build_dir, sdk_path, ndk_path, javacc_path,
|
||||
|
||||
return root_dir
|
||||
|
||||
|
||||
class KnownApks:
|
||||
|
||||
def __init__(self):
|
||||
self.path = os.path.join('stats', 'known_apks.txt')
|
||||
self.apks = {}
|
||||
if os.path.exists(self.path):
|
||||
for line in file( self.path):
|
||||
t = line.rstrip().split(' ')
|
||||
self.apks[t[0]] = t[1]
|
||||
self.changed = False
|
||||
|
||||
def writeifchanged(self):
|
||||
if self.changed:
|
||||
if not os.path.exists('stats'):
|
||||
os.mkdir('stats')
|
||||
f = open(self.path, 'w')
|
||||
for apk, app in self.apks.iteritems():
|
||||
f.write(apk + ' ' + app + '\n')
|
||||
f.close()
|
||||
|
||||
def recordapk(self, apk, app):
|
||||
if not apk in self.apks:
|
||||
self.apks[apk] = app
|
||||
self.changed = True
|
||||
|
||||
def getapp(self, apkname):
|
||||
if apkname in self.apks:
|
||||
return self.apks[apkname]
|
||||
return None
|
||||
|
1
stats/.gitignore
vendored
Normal file
1
stats/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
logs/
|
573
stats/known_apks.txt
Normal file
573
stats/known_apks.txt
Normal file
@ -0,0 +1,573 @@
|
||||
org.adw.launcher_34.apk org.adw.launcher
|
||||
BarcodeScanner3.51.apk com.google.zxing.client.android
|
||||
OpenGPSTracker-0.9.23.apk nl.sogeti.android.gpstracker
|
||||
org.wahtod.wififixer_770.apk org.wahtod.wififixer
|
||||
com.teleca.jamendo_33.apk com.teleca.jamendo
|
||||
cmupdaterapp.ui_501.apk cmupdaterapp.ui
|
||||
mustard-0.2.1.apk org.mustard.android
|
||||
sms-backup-plus-v1.3.3.apk com.zegoggles.smssync
|
||||
BarcodeScanner3.6.apk com.google.zxing.client.android
|
||||
k9-3.204-release.apk com.fsck.k9
|
||||
org.coolreader_255.apk org.coolreader
|
||||
k9-3.593-release.apk com.fsck.k9
|
||||
andLess_05202011.apk net.avs234
|
||||
com.volosyukivan_26.apk com.volosyukivan
|
||||
org.zirco_10.apk org.zirco
|
||||
com.example.android.maxpapers_35.apk com.example.android.maxpapers
|
||||
mixare-0062.apk org.mixare
|
||||
talkmyphone-2.06-beta.apk com.googlecode.talkmyphone
|
||||
com.eleybourn.bookcatalogue_35.apk com.eleybourn.bookcatalogue
|
||||
SwiFTP_1.24.apk org.swiftp
|
||||
KeePassDroid-1.8.5.1.apk com.android.keepass
|
||||
org.geometerplus.zlibrary.ui.android_10100.apk org.geometerplus.zlibrary.ui.android
|
||||
SparseRSS_0.7.2.apk de.shandschuh.sparserss
|
||||
com.android.keepass_80.apk com.android.keepass
|
||||
com.volosyukivan_23.apk com.volosyukivan
|
||||
mobileorg-release.apk com.matburt.mobileorg
|
||||
com.ghostsq.commander_97.apk com.ghostsq.commander
|
||||
org.fdroid.fdroid_15.apk org.fdroid.fdroid
|
||||
An.stop_9.apk An.stop
|
||||
com.liato.bankdroid_120.apk com.liato.bankdroid
|
||||
androidVNC_build20100725.apk android.androidVNC
|
||||
com.morphoss.acal_15.apk com.morphoss.acal
|
||||
FDroid_0.12.apk org.fdroid.fdroid
|
||||
org.zirco_13.apk org.zirco
|
||||
linphone-android-1.2.1.apk org.linphone
|
||||
com.nexes.manager_212.apk com.nexes.manager
|
||||
org.yaaic_9.apk org.yaaic
|
||||
Cubed_1.0.68.apk org.abrantix.rockon.rockonnggl
|
||||
Orbot-1.0.6-Tor-0.2.3.7-alpha-FINAL.apk org.torproject.android
|
||||
mixare-0063.apk org.mixare
|
||||
com.totsp.bookworm_18.apk com.totsp.bookworm
|
||||
Postcode_1.0.apk net.tevp.postcode
|
||||
BarcodeScanner3.7.apk com.google.zxing.client.android
|
||||
transdroid-0.22.2.apk org.transdroid
|
||||
SparseRSS_0.6.2.apk de.shandschuh.sparserss
|
||||
org.ttrssreader_840.apk org.ttrssreader
|
||||
com.kmagic.solitaire_450.apk com.kmagic.solitaire
|
||||
com.evancharlton.mileage_3000.apk com.evancharlton.mileage
|
||||
alogcat-2.1.4.apk org.jtb.alogcat
|
||||
org.jmoyer.NotificationPlus_2.apk org.jmoyer.NotificationPlus
|
||||
org.fdroid.fdroid_9.apk org.fdroid.fdroid
|
||||
CSipSimple-0.03-01.apk com.csipsimple
|
||||
edu.rit.poe.atomix_2.apk edu.rit.poe.atomix
|
||||
org.adaway_22.apk org.adaway
|
||||
goo.TeaTimer_9.apk goo.TeaTimer
|
||||
org.adaway_21.apk org.adaway
|
||||
BarcodeScanner3.52.apk com.google.zxing.client.android
|
||||
com.eleybourn.bookcatalogue_47.apk com.eleybourn.bookcatalogue
|
||||
com.googlecode.androidcells_1.apk com.googlecode.androidcells
|
||||
com.andrewshu.android.reddit_70.apk com.andrewshu.android.reddit
|
||||
k9-3.200-release.apk com.fsck.k9
|
||||
com.eleybourn.bookcatalogue_62.apk com.eleybourn.bookcatalogue
|
||||
com.funambol.androidsync_16.apk com.funambol.androidsync
|
||||
com.voidcode.diasporawebclient_3.apk com.voidcode.diasporawebclient
|
||||
name.bagi.levente.pedometer_6.apk name.bagi.levente.pedometer
|
||||
dk.andsen.asqlitemanager_7.apk dk.andsen.asqlitemanager
|
||||
com.morphoss.acal_35.apk com.morphoss.acal
|
||||
gvSIG_Mini_1_2_2_SDK16-456.apk es.prodevelop.gvsig.mini
|
||||
org.yaxim.androidclient_9.apk org.yaxim.androidclient
|
||||
org.geometerplus.zlibrary.ui.android_9903.apk org.geometerplus.zlibrary.ui.android
|
||||
org.mythdroid_53.apk org.mythdroid
|
||||
com.android.keepass_78.apk com.android.keepass
|
||||
org.yaxim.androidclient_11.apk org.yaxim.androidclient
|
||||
FBReaderJ-0.7.13.apk org.geometerplus.zlibrary.ui.android
|
||||
com.evancharlton.mileage_3080.apk com.evancharlton.mileage
|
||||
org.androidsoft.games.memory.kids_13.apk org.androidsoft.games.memory.kids
|
||||
com.android.keepass_77.apk com.android.keepass
|
||||
2010-12-09-OpenSatNav-snapshot-r197.apk org.opensatnav
|
||||
FDroid_0.11.apk org.fdroid.fdroid
|
||||
FBReaderJ-0.7.14.apk org.geometerplus.zlibrary.ui.android
|
||||
org.vudroid_5.apk org.vudroid
|
||||
DesktopLabel_1.3.0.apk com.serone.desktoplabel
|
||||
se.peterbjorkman.android.trafikinfo_12.apk se.peterbjorkman.android.trafikinfo
|
||||
org.geometerplus.zlibrary.ui.android_10011.apk org.geometerplus.zlibrary.ui.android
|
||||
com.appengine.paranoid_android.lost_12.apk com.appengine.paranoid_android.lost
|
||||
com.andrewshu.android.reddit_68.apk com.andrewshu.android.reddit
|
||||
com.google.android.maps.mytracks_23.apk com.google.android.maps.mytracks
|
||||
fr.seeks_4.apk fr.seeks
|
||||
com.alfray.timeriffic_10903.apk com.alfray.timeriffic
|
||||
org.paulmach.textedit_12.apk org.paulmach.textedit
|
||||
httpmon.apk org.jtb.httpmon
|
||||
com.episode6.android.appalarm.lite_30.apk com.episode6.android.appalarm.pro
|
||||
org.droidseries_12.apk org.droidseries
|
||||
com.FireFart.Permissions_2.apk com.FireFart.Permissions
|
||||
org.yaxim.androidclient_5.apk org.yaxim.androidclient
|
||||
org.mult.daap_30.apk org.mult.daap
|
||||
com.morphoss.acal_16.apk com.morphoss.acal
|
||||
com.googlecode.droidwall_156.apk com.googlecode.droidwall
|
||||
org.wordpress.android_33.apk org.wordpress.android
|
||||
com.morphoss.acal_28.apk com.morphoss.acal
|
||||
com.wanghaus.remembeer_50.apk com.wanghaus.remembeer
|
||||
org.sixgun.ponyexpress_12.apk org.sixgun.ponyexpress
|
||||
com.andrewshu.android.reddit_83.apk com.andrewshu.android.reddit
|
||||
org.jfedor.frozenbubble_8.apk org.jfedor.frozenbubble
|
||||
CSipSimple-0.01-01.apk com.csipsimple
|
||||
Aptoide_2.0.apk cm.aptoide.pt
|
||||
ReplicaIsland_1.3.apk com.replica.replicaisland
|
||||
to.networld.android.divedroid_1.apk to.networld.android.divedroid
|
||||
org.ttrssreader_1220.apk org.ttrssreader
|
||||
com.unitedcoders.android.gpodroid_12.apk com.unitedcoders.android.gpodroid
|
||||
cz.hejl.chesswalk_7.apk cz.hejl.chesswalk
|
||||
net.rocrail.androc_219.apk net.rocrail.androc
|
||||
org.yaxim.androidclient_10.apk org.yaxim.androidclient
|
||||
com.beem.project.beem_9.apk com.beem.project.beem
|
||||
AppBak_1.0.apk org.moparisthebest.appbak
|
||||
com.funambol.androidsync_15.apk com.funambol.androidsync
|
||||
sms-backup-plus-v1.3.2.apk com.zegoggles.smssync
|
||||
org.wahtod.wififixer_758.apk org.wahtod.wififixer
|
||||
com.beem.project.beem_7.apk com.beem.project.beem
|
||||
org.coolreader_109.apk org.coolreader
|
||||
de.shandschuh.sparserss_70.apk de.shandschuh.sparserss
|
||||
net.sylvek.sharemyposition_16.apk net.sylvek.sharemyposition
|
||||
android.androidVNC_13.apk android.androidVNC
|
||||
org.xbmc.android.remote_768.apk org.xbmc.android.remote
|
||||
OpenSatNav_0.9.apk org.opensatnav
|
||||
net.rocrail.androc_228.apk net.rocrail.androc
|
||||
AlarmKlock_1.6.apk com.angrydoughnuts.android.alarmclock
|
||||
0.2.2.14-alpha-orbot-1.0.4.apk org.torproject.android
|
||||
ConnectBot_1.7.1.apk org.connectbot
|
||||
com.ichi2.anki_12.apk com.ichi2.anki
|
||||
org.coolreader_308.apk org.coolreader
|
||||
vu.de.urpool.quickdroid_37.apk vu.de.urpool.quickdroid
|
||||
org.fdroid.fdroid_10.apk org.fdroid.fdroid
|
||||
org.coolreader_60.apk org.coolreader
|
||||
Mandelbrot2_v0.13_20110313a.apk com.alfray.mandelbrot2
|
||||
org.coolreader_259.apk org.coolreader
|
||||
com.googlecode.chartdroid_18.apk com.googlecode.chartdroid
|
||||
net.rocrail.androc_252.apk net.rocrail.androc
|
||||
com.funambol.androidsync_9.apk com.funambol.androidsync
|
||||
SparseRSS_0.8.3.apk de.shandschuh.sparserss
|
||||
net.bytten.xkcdviewer_15.apk net.bytten.xkcdviewer
|
||||
org.geometerplus.zlibrary.ui.android_10014.apk org.geometerplus.zlibrary.ui.android
|
||||
org.coolreader_184.apk org.coolreader
|
||||
net.rocrail.androc_289.apk net.rocrail.androc
|
||||
com.funambol.androidsync_10.apk com.funambol.androidsync
|
||||
FBReaderJ-0.7.11.apk org.geometerplus.zlibrary.ui.android
|
||||
yaaic-0.6.1.apk org.yaaic
|
||||
CSipSimple_0.00-16.apk com.csipsimple
|
||||
org.pocketworkstation.pckeyboard_1018.apk org.pocketworkstation.pckeyboard
|
||||
net.rocrail.androc_221.apk net.rocrail.androc
|
||||
k9-3.207-release.apk com.fsck.k9
|
||||
org.ttrssreader_807.apk org.ttrssreader
|
||||
Sipdroid-2.1.apk org.sipdroid.sipua
|
||||
at.tomtasche.reader_15.apk at.tomtasche.reader
|
||||
com.ringdroid_20500.apk com.ringdroid
|
||||
CSipSimple-0.02-01.apk com.csipsimple
|
||||
com.eleybourn.bookcatalogue_69.apk com.eleybourn.bookcatalogue
|
||||
transdroid-0.22.3.apk org.transdroid
|
||||
org.scoutant.blokish_8.apk org.scoutant.blokish
|
||||
com.android.inputmethod.norwegian_13.apk com.android.inputmethod.norwegian
|
||||
com.ichi2.anki_21.apk com.ichi2.anki
|
||||
de.shandschuh.sparserss_47.apk de.shandschuh.sparserss
|
||||
com.totsp.bookworm_19.apk com.totsp.bookworm
|
||||
KeePassDroid-1.8.6.apk com.android.keepass
|
||||
org.eehouse.android.xw4_26.apk org.eehouse.android.xw4
|
||||
MathDoku_1.6.apk net.cactii.mathdoku
|
||||
org.pocketworkstation.pckeyboard_1029.apk org.pocketworkstation.pckeyboard
|
||||
org.sixgun.ponyexpress_9.apk org.sixgun.ponyexpress
|
||||
org.johanhil.flygtider_9.apk org.johanhil.flygtider
|
||||
CSipSimple-0.03-00.apk com.csipsimple
|
||||
org.coolreader_275.apk org.coolreader
|
||||
org.geometerplus.zlibrary.ui.android_10102.apk org.geometerplus.zlibrary.ui.android
|
||||
org.yaxim.androidclient_7.apk org.yaxim.androidclient
|
||||
de.blau.android.Application_14.apk de.blau.android
|
||||
se.johanhil.duckduckgo_1.apk se.johanhil.duckduckgo
|
||||
org.eehouse.android.xw4_31.apk org.eehouse.android.xw4
|
||||
com.teleca.jamendo_31.apk com.teleca.jamendo
|
||||
org.coolreader_264.apk org.coolreader
|
||||
fennec-5.0.multi.eabi-arm.apk org.mozilla.firefox
|
||||
org.geometerplus.zlibrary.ui.android_102061.apk org.geometerplus.zlibrary.ui.android
|
||||
org.coolreader_124.apk org.coolreader
|
||||
com.android.keepass_82.apk com.android.keepass
|
||||
com.eleybourn.bookcatalogue_53.apk com.eleybourn.bookcatalogue
|
||||
com.totsp.crossword.shortyz_30100.apk com.totsp.crossword.shortyz
|
||||
com.google.android.diskusage_3020.apk com.google.android.diskusage
|
||||
net.tapi.handynotes_3.apk net.tapi.handynotes
|
||||
com.chessclock.android_8.apk com.chessclock.android
|
||||
cz.romario.opensudoku_1104.apk cz.romario.opensudoku
|
||||
MyTracks-1.0.21.apk com.google.android.maps.mytracks
|
||||
net.osmand.plus_37.apk net.osmand.plus
|
||||
org.helllabs.android.xmp_15.apk org.helllabs.android.xmp
|
||||
org.adaway_13.apk org.adaway
|
||||
com.google.android.diskusage_2004.apk com.google.android.diskusage
|
||||
KeePassDroid-1.8.3.apk com.android.keepass
|
||||
com.googlecode.droidwall_148.apk com.googlecode.droidwall
|
||||
com.google.code.appsorganizer_167.apk com.google.code.appsorganizer
|
||||
com.morphoss.acal_18.apk com.morphoss.acal
|
||||
info.guardianproject.cacert_4.apk info.guardianproject.cacert
|
||||
com.volosyukivan_25.apk com.volosyukivan
|
||||
pl.magot.vetch.ancal_32.apk pl.magot.vetch.ancal
|
||||
k9-3.400-release.apk com.fsck.k9
|
||||
OpenGPSTracker-0.9.21.apk nl.sogeti.android.gpstracker
|
||||
FBReaderJ-0.7.17.apk org.geometerplus.zlibrary.ui.android
|
||||
yaaic-0.5.apk org.yaaic
|
||||
com.commonsware.android.arXiv_92.apk com.commonsware.android.arXiv
|
||||
nu.firetech.android.pactrack_1310.apk nu.firetech.android.pactrack
|
||||
com.funambol.androidsync_8.apk com.funambol.androidsync
|
||||
ru.gelin.android.weather.notification_23.apk ru.gelin.android.weather.notification
|
||||
org.zirco_11.apk org.zirco
|
||||
com.ichi2.anki_18.apk com.ichi2.anki
|
||||
org.curiouscreature.android.shelves_1.apk org.curiouscreature.android.shelves
|
||||
net.mafro.android.wakeonlan_12.apk net.mafro.android.wakeonlan
|
||||
com.morphoss.acal_37.apk com.morphoss.acal
|
||||
org.ttrssreader_1000.apk org.ttrssreader
|
||||
de.shandschuh.slightbackup_12.apk de.shandschuh.slightbackup
|
||||
net.bytten.xkcdviewer_17.apk net.bytten.xkcdviewer
|
||||
com.danga.squeezer_5.apk com.danga.squeezer
|
||||
net.tedstein.AndroSS_7.apk net.tedstein.AndroSS
|
||||
k9-3.604-release.apk com.fsck.k9
|
||||
com.mp3tunes.android.player_89.apk com.mp3tunes.android.player
|
||||
org.geometerplus.zlibrary.ui.android_102031.apk org.geometerplus.zlibrary.ui.android
|
||||
org.ttrssreader_931.apk org.ttrssreader
|
||||
Jamendo_0.9.9.1.apk com.teleca.jamendo
|
||||
com.roozen.SoundManager_18.apk com.roozen.SoundManager
|
||||
OpenSatNav-snapshot-r179.apk org.opensatnav
|
||||
org.jfedor.frozenbubble_9.apk org.jfedor.frozenbubble
|
||||
net.osmand.plus_42.apk net.osmand.plus
|
||||
org.yaxim.androidclient_8.apk org.yaxim.androidclient
|
||||
org.zirco_16.apk org.zirco
|
||||
KeePassDroid-1.8.6.0.1.apk com.android.keepass
|
||||
org.coolreader_75.apk org.coolreader
|
||||
SparseRSS_0.7.apk de.shandschuh.sparserss
|
||||
DroidLife.apk org.jtb.droidlife
|
||||
org.sparkleshare.android_1.apk org.sparkleshare.android
|
||||
org.jtb.alogcat_38.apk org.jtb.alogcat
|
||||
gvSIG_Mini_1_0_0_SDK16.apk es.prodevelop.gvsig.mini
|
||||
net.sourceforge.servestream_46.apk net.sourceforge.servestream
|
||||
org.jessies.mathdroid_25.apk org.jessies.mathdroid
|
||||
org.wahtod.wififixer_759.apk org.wahtod.wififixer
|
||||
me.guillaumin.android.osmtracker_20.apk me.guillaumin.android.osmtracker
|
||||
org.geometerplus.zlibrary.ui.android_9911.apk org.geometerplus.zlibrary.ui.android
|
||||
k9-3.605-release.apk com.fsck.k9
|
||||
FDroid_0.10.apk org.fdroid.fdroid
|
||||
com.android.keepass_76.apk com.android.keepass
|
||||
k9-3.603-release.apk com.fsck.k9
|
||||
sms-backup-plus-v1.2.apk com.zegoggles.smssync
|
||||
KeePassDroid-1.8.6.4.apk com.android.keepass
|
||||
com.google.code.appsorganizer_166.apk com.google.code.appsorganizer
|
||||
MathDoku_1.5.apk net.cactii.mathdoku
|
||||
WiFiKeyboard.apk com.volosyukivan
|
||||
FBReaderJ-0.99.2.apk org.geometerplus.zlibrary.ui.android
|
||||
com.dozingcatsoftware.bouncy_4.apk com.dozingcatsoftware.bouncy
|
||||
com.andrewshu.android.reddit_76.apk com.andrewshu.android.reddit
|
||||
org.scoutant.blokish_1.apk org.scoutant.blokish
|
||||
PiwikMobile_1.apk org.piwik.mobile
|
||||
com.boardgamegeek_20.apk com.boardgamegeek
|
||||
tuioDroid.impl_4.apk tuioDroid.impl
|
||||
de.shandschuh.slightbackup_6.apk de.shandschuh.slightbackup
|
||||
org.coolreader_121.apk org.coolreader
|
||||
de.shandschuh.sparserss_50.apk de.shandschuh.sparserss
|
||||
navit-0.2.0.apk org.navitproject.navit
|
||||
org.coolreader_197.apk org.coolreader
|
||||
com.webworxshop.swallowcatcher_6.apk com.webworxshop.swallowcatcher
|
||||
net.osmand_25.apk net.osmand
|
||||
FDroid_0.13.apk org.fdroid.fdroid
|
||||
net.bytten.xkcdviewer_21.apk net.bytten.xkcdviewer
|
||||
se.johanhil.clipboard_2.apk se.johanhil.clipboard
|
||||
net.tedstein.AndroSS_8.apk net.tedstein.AndroSS
|
||||
org.coolreader_162.apk org.coolreader
|
||||
SparseRSS_0.7.1.apk de.shandschuh.sparserss
|
||||
net.rocrail.androc_284.apk net.rocrail.androc
|
||||
k9-3.202-release.apk com.fsck.k9
|
||||
org.kreed.vanilla_16.apk org.kreed.vanilla
|
||||
gvSIG_Mini_1_1_0_SDK16.apk es.prodevelop.gvsig.mini
|
||||
org.ttrssreader_1210.apk org.ttrssreader
|
||||
remuco.client.android_1.apk remuco.client.android
|
||||
org.vudroid_3.apk org.vudroid
|
||||
Mathdoku-1.7.apk net.cactii.mathdoku
|
||||
net.sourceforge.servestream_35.apk net.sourceforge.servestream
|
||||
com.nexes.manager_218.apk com.nexes.manager
|
||||
com.android.keepass_65.apk com.android.keepass
|
||||
com.angrydoughnuts.android.alarmclock_8.apk com.angrydoughnuts.android.alarmclock
|
||||
org.fdroid.fdroid_16.apk org.fdroid.fdroid
|
||||
net.rocrail.androc_230.apk net.rocrail.androc
|
||||
org.example.pushupbuddy_1.apk org.example.pushupbuddy
|
||||
LifeSaver2_1.0.apk com.textuality.lifesaver2
|
||||
Beem_0.1.4.apk com.beem.project.beem
|
||||
org.jtb.alogcat_36.apk org.jtb.alogcat
|
||||
com.andrewshu.android.reddit_71.apk com.andrewshu.android.reddit
|
||||
dk.andsen.asqlitemanager_9.apk dk.andsen.asqlitemanager
|
||||
com.eleybourn.bookcatalogue_59.apk com.eleybourn.bookcatalogue
|
||||
info.staticfree.android.units_7.apk info.staticfree.android.units
|
||||
com.webworxshop.swallowcatcher_7.apk com.webworxshop.swallowcatcher
|
||||
k9-3.304-release.apk com.fsck.k9
|
||||
net.tedstein.AndroSS_10.apk net.tedstein.AndroSS
|
||||
com.nexes.manager_4.apk com.nexes.manager
|
||||
com.google.android.diskusage_3010.apk com.google.android.diskusage
|
||||
org.pocketworkstation.pckeyboard_1020.apk org.pocketworkstation.pckeyboard
|
||||
org.paulmach.textedit_14.apk org.paulmach.textedit
|
||||
com.morphoss.acal_34.apk com.morphoss.acal
|
||||
com.alfray.timeriffic_10905.apk com.alfray.timeriffic
|
||||
org.ttrssreader_1074.apk org.ttrssreader
|
||||
com.bwx.bequick_201106160.apk com.bwx.bequick
|
||||
k9-3.307-release.apk com.fsck.k9
|
||||
org.coolreader_169.apk org.coolreader
|
||||
org.mixare_14.apk org.mixare
|
||||
com.teleca.jamendo_32.apk com.teleca.jamendo
|
||||
MythMote_1.4.0.apk tkj.android.homecontrol.mythmote
|
||||
org.scoutant.blokish_7.apk org.scoutant.blokish
|
||||
com.morphoss.acal_27.apk com.morphoss.acal
|
||||
Tricorder_5.11.apk org.hermit.tricorder
|
||||
mustard-0.1.12c.apk org.mustard.android
|
||||
OpenManager_1.1.2.apk com.nexes.manager
|
||||
Postcode_1.1.apk net.tevp.postcode
|
||||
FBReaderJ-0.99.9.apk org.geometerplus.zlibrary.ui.android
|
||||
com.morphoss.acal_32.apk com.morphoss.acal
|
||||
net.sourceforge.servestream_48.apk net.sourceforge.servestream
|
||||
org.yaaic_11.apk org.yaaic
|
||||
k9-3.601-release.apk com.fsck.k9
|
||||
net.tedstein.AndroSS_6.apk net.tedstein.AndroSS
|
||||
net.gaast.giggity_4.apk net.gaast.giggity
|
||||
org.penghuang.tools.rotationlock_5.apk org.penghuang.tools.rotationlock
|
||||
com.bwx.qs.battery_201010020.apk com.bwx.qs.battery
|
||||
WhereRing_1.99.0.apk seanfoy.wherering
|
||||
com.bwx.bequick_201012060.apk com.bwx.bequick
|
||||
org.coolreader_505.apk org.coolreader
|
||||
mixedbit.speechtrainer_2.apk mixedbit.speechtrainer
|
||||
com.liato.bankdroid_102.apk com.liato.bankdroid
|
||||
org.wahtod.wififixer_760.apk org.wahtod.wififixer
|
||||
com.morphoss.acal_14.apk com.morphoss.acal
|
||||
com.mobilepearls.sokoban_12.apk com.mobilepearls.sokoban
|
||||
net.sf.andbatdog.batterydog_11.apk net.sf.andbatdog.batterydog
|
||||
org.pocketworkstation.pckeyboard_1022.apk org.pocketworkstation.pckeyboard
|
||||
org.fdroid.fdroid_13.apk org.fdroid.fdroid
|
||||
com.ichi2.anki_22.apk com.ichi2.anki
|
||||
info.guardianproject.cacert_3.apk info.guardianproject.cacert
|
||||
mustard-0.1.12f.apk org.mustard.android
|
||||
Scrambled Net-5.0.apk
|
||||
org.zirco_12.apk org.zirco
|
||||
org.coolreader_64.apk org.coolreader
|
||||
org.coolreader_135.apk org.coolreader
|
||||
org.wahtod.wififixer_822.apk org.wahtod.wififixer
|
||||
regalandroid-1.0.1-aligned.apk net.dahanne.android.regalandroid
|
||||
Osmdroid_2.0.apk org.andnav.osm
|
||||
XCSoar6.2.4.apk org.xcsoar
|
||||
Ringdroid-2.3.apk com.ringdroid
|
||||
net.rocrail.androc_324.apk net.rocrail.androc
|
||||
org.geometerplus.zlibrary.ui.android_9918.apk org.geometerplus.zlibrary.ui.android
|
||||
org.coolreader_244.apk org.coolreader
|
||||
org.ttrssreader_911.apk org.ttrssreader
|
||||
com.googlecode.androidcells_9.apk com.googlecode.androidcells
|
||||
org.sixgun.ponyexpress_5.apk org.sixgun.ponyexpress
|
||||
Sipdroid-2.0.1.apk org.sipdroid.sipua
|
||||
com.wanghaus.remembeer_48.apk com.wanghaus.remembeer
|
||||
com.eleybourn.bookcatalogue_61.apk com.eleybourn.bookcatalogue
|
||||
de.ub0r.android.adBlock_5.apk de.ub0r.android.adBlock
|
||||
org.kost.externalip_3.apk org.kost.externalip
|
||||
org.jtb.alogcat_34.apk org.jtb.alogcat
|
||||
org.coolreader_447.apk org.coolreader
|
||||
OsmAnd-0.5.1beta-b3.apk net.osmand
|
||||
org.ttrssreader_1040.apk org.ttrssreader
|
||||
org.adaway_16.apk org.adaway
|
||||
org.coolreader_279.apk org.coolreader
|
||||
info.staticfree.android.units_8.apk info.staticfree.android.units
|
||||
net.rocrail.androc_273.apk net.rocrail.androc
|
||||
Mixare_0.5.apk org.mixare
|
||||
com.smorgasbork.hotdeath_3.apk com.smorgasbork.hotdeath
|
||||
com.funambol.androidsync_14.apk com.funambol.androidsync
|
||||
com.ghostsq.commander_94.apk com.ghostsq.commander
|
||||
SayMyName_2.5.3.2.apk org.mailboxer.saymyname
|
||||
OpenGPSTracker-1.0.apk nl.sogeti.android.gpstracker
|
||||
org.adaway_19.apk org.adaway
|
||||
CSipSimple_0.00-15-06.apk com.csipsimple
|
||||
mustard-0.1.9.6-2.apk org.mustard.android
|
||||
de.shandschuh.sparserss_68.apk de.shandschuh.sparserss
|
||||
FDroid_0.16.apk org.fdroid.fdroid
|
||||
com.dozingcatsoftware.bouncy_10.apk com.dozingcatsoftware.bouncy
|
||||
com.googlecode.droidwall_146.apk com.googlecode.droidwall
|
||||
net.rocrail.androc_266.apk net.rocrail.androc
|
||||
BarcodeScanner3.72.apk com.google.zxing.client.android
|
||||
de.shandschuh.sparserss_57.apk de.shandschuh.sparserss
|
||||
com.agiro.scanner.android_2.apk com.agiro.scanner.android
|
||||
mustard-0.1.9.7a.apk org.mustard.android
|
||||
FBReaderJ-0.7.5.apk org.geometerplus.zlibrary.ui.android
|
||||
org.geometerplus.zlibrary.ui.android_101101.apk org.geometerplus.zlibrary.ui.android
|
||||
BarcodeScanner3.53.apk com.google.zxing.client.android
|
||||
de.shandschuh.sparserss_65.apk de.shandschuh.sparserss
|
||||
com.bwx.bequick_201107260.apk com.bwx.bequick
|
||||
linphone-android-1.1.6.apk org.linphone
|
||||
org.coolreader_94.apk org.coolreader
|
||||
org.coolreader_509.apk org.coolreader
|
||||
sms-backup-plus-v1.3.7.apk com.zegoggles.smssync
|
||||
org.wahtod.wififixer_838.apk org.wahtod.wififixer
|
||||
org.sixgun.ponyexpress_8.apk org.sixgun.ponyexpress
|
||||
org.wordpress.android_31.apk org.wordpress.android
|
||||
net.fercanet.LNM_3.apk net.fercanet.LNM
|
||||
org.coolreader_141.apk org.coolreader
|
||||
at.tomtasche.reader_12.apk at.tomtasche.reader
|
||||
httpmon_0.4.10.apk org.jtb.httpmon
|
||||
org.ttrssreader_1002.apk org.ttrssreader
|
||||
com.andrewshu.android.reddit_75.apk com.andrewshu.android.reddit
|
||||
org.jfedor.frozenbubble_11.apk org.jfedor.frozenbubble
|
||||
net.androgames.level_27.apk net.androgames.level
|
||||
NetCounter_0.14.1.apk net.jaqpot.netcounter
|
||||
org.jfedor.frozenbubble_12.apk org.jfedor.frozenbubble
|
||||
org.zirco_15.apk org.zirco
|
||||
mythmote-1.5.1.apk tkj.android.homecontrol.mythmote
|
||||
Aptoide_1.2.0.apk cm.aptoide.pt
|
||||
com.eddyspace.networkmonitor_2.apk com.eddyspace.networkmonitor
|
||||
org.scoutant.blokish_9.apk org.scoutant.blokish
|
||||
net.osmand_26.apk net.osmand
|
||||
com.google.android.diskusage_2103.apk com.google.android.diskusage
|
||||
k9-4.001-release.apk com.fsck.k9
|
||||
net.osmand.plus_34.apk net.osmand.plus
|
||||
yaaic-0.6.apk org.yaaic
|
||||
org.droidseries_13.apk org.droidseries
|
||||
com.google.code.appsorganizer_163.apk com.google.code.appsorganizer
|
||||
0.2.2.22-alpha-orbot-1.0.4.1.apk org.torproject.android
|
||||
OpenGPSTracker-0.9.22.apk nl.sogeti.android.gpstracker
|
||||
com.eleybourn.bookcatalogue_68.apk com.eleybourn.bookcatalogue
|
||||
caldwell.ben.trolly_6.apk caldwell.ben.trolly
|
||||
com.ichi2.anki_20.apk com.ichi2.anki
|
||||
com.proch.practicehub_1.apk com.proch.practicehub
|
||||
com.googlecode.droidwall_153.apk com.googlecode.droidwall
|
||||
net.osmand.plus_36.apk net.osmand.plus
|
||||
com.eleybourn.bookcatalogue_49.apk com.eleybourn.bookcatalogue
|
||||
org.fdroid.fdroid_14.apk org.fdroid.fdroid
|
||||
Aptoide.apk cm.aptoide.pt
|
||||
com.andrewshu.android.reddit_67.apk com.andrewshu.android.reddit
|
||||
fm.libre.droid_3.apk fm.libre.droid
|
||||
org.ttrssreader_1032.apk org.ttrssreader
|
||||
XWords4_android_beta_18.apk org.eehouse.android.xw4
|
||||
org.ttrssreader_850.apk org.ttrssreader
|
||||
TiltMazes-V1.2.apk com.lecz.android.tiltmazes
|
||||
org.coolreader_241.apk org.coolreader
|
||||
fm.libre.droid_4.apk fm.libre.droid
|
||||
Cubed_1.0.67.apk org.abrantix.rockon.rockonnggl
|
||||
org.coolreader_303.apk org.coolreader
|
||||
net.rocrail.androc_315.apk net.rocrail.androc
|
||||
com.liato.bankdroid_110.apk com.liato.bankdroid
|
||||
org.adaway_20.apk org.adaway
|
||||
org.jtb.droidlife_21.apk org.jtb.droidlife
|
||||
KeePassDroid_1.7.2.apk com.android.keepass
|
||||
MobileC64-1.1.3.apk de.joergjahnke.c64.android
|
||||
org.geometerplus.zlibrary.ui.android_9912.apk org.geometerplus.zlibrary.ui.android
|
||||
com.webworxshop.swallowcatcher_5.apk com.webworxshop.swallowcatcher
|
||||
org.coolreader_103.apk org.coolreader
|
||||
com.morphoss.acal_36.apk com.morphoss.acal
|
||||
mustard-0.1.14b.apk org.mustard.android
|
||||
sms-backup-plus-v1.4.0.apk com.zegoggles.smssync
|
||||
k9-3.600-release.apk com.fsck.k9
|
||||
org.xbmc.android.remote_730.apk org.xbmc.android.remote
|
||||
org.geometerplus.zlibrary.ui.android_101081.apk org.geometerplus.zlibrary.ui.android
|
||||
vu.de.urpool.quickdroid_38.apk vu.de.urpool.quickdroid
|
||||
org.marcus905.wifi.ace_20100924.apk org.marcus905.wifi.ace
|
||||
org.coolreader_81.apk org.coolreader
|
||||
net.rocrail.androc_280.apk net.rocrail.androc
|
||||
org.damazio.notifier_11.apk org.damazio.notifier
|
||||
com.gpl.rpg.AndorsTrail_25.apk com.gpl.rpg.AndorsTrail
|
||||
Sipdroid-2.3.apk org.sipdroid.sipua
|
||||
OpenGPSTracker-0.9.20.apk nl.sogeti.android.gpstracker
|
||||
org.ttrssreader_892.apk org.ttrssreader
|
||||
Scrambled Net-5.0.apk org.hermit.netscramble
|
||||
com.eleybourn.bookcatalogue_70.apk com.eleybourn.bookcatalogue
|
||||
APG-1.0.8-release.apk org.thialfihar.android.apg
|
||||
me.guillaumin.android.osmtracker_21.apk me.guillaumin.android.osmtracker
|
||||
org.geometerplus.zlibrary.ui.android_102021.apk org.geometerplus.zlibrary.ui.android
|
||||
FBReaderJ-0.7.16.apk org.geometerplus.zlibrary.ui.android
|
||||
k9-3.800-release.apk com.fsck.k9
|
||||
org.geometerplus.zlibrary.ui.android_10013.apk org.geometerplus.zlibrary.ui.android
|
||||
info.lamatricexiste.network_42.apk info.lamatricexiste.network
|
||||
org.coolreader_165.apk org.coolreader
|
||||
transdroid-1.0.4.apk org.transdroid
|
||||
k9-4.003-release.apk com.fsck.k9
|
||||
org.coolreader_96.apk org.coolreader
|
||||
org.thoughtcrime.securesms_21.apk org.thoughtcrime.securesms
|
||||
com.google.code.appsorganizer_164.apk com.google.code.appsorganizer
|
||||
org.coolreader_155.apk org.coolreader
|
||||
org.vudroid_4.apk org.vudroid
|
||||
mustard-0.1.10.apk org.mustard.android
|
||||
org.geometerplus.zlibrary.ui.android_10101.apk org.geometerplus.zlibrary.ui.android
|
||||
transdroid-1.1.0-beta.apk org.transdroid
|
||||
org.yaxim.androidclient_6.apk org.yaxim.androidclient
|
||||
OsmAnd-0.5.1beta-b2.apk net.osmand
|
||||
StatusNet1.0.2.apk net.status.client.mobile
|
||||
org.fdroid.fdroid_12.apk org.fdroid.fdroid
|
||||
com.morphoss.acal_33.apk com.morphoss.acal
|
||||
FDroid_0.15.apk org.fdroid.fdroid
|
||||
net.sylvek.sharemyposition_20.apk net.sylvek.sharemyposition
|
||||
org.yaaic_10.apk org.yaaic
|
||||
org.coolreader_263.apk org.coolreader
|
||||
BarcodeScanner3.4.apk com.google.zxing.client.android
|
||||
urbanstew.RehearsalAssistant_22.apk urbanstew.RehearsalAssistant
|
||||
org.wahtod.wififixer_620.apk org.wahtod.wififixer
|
||||
org.coolreader_86.apk org.coolreader
|
||||
org.zirco_17.apk org.zirco
|
||||
net.rocrail.androc_286.apk net.rocrail.androc
|
||||
net.tedstein.AndroSS_13.apk net.tedstein.AndroSS
|
||||
net.rocrail.androc_281.apk net.rocrail.androc
|
||||
net.osmand.plus_39.apk net.osmand.plus
|
||||
org.ttrssreader_1023.apk org.ttrssreader
|
||||
org.tomdroid_6.apk org.tomdroid
|
||||
FBReaderJ-0.99.7.apk org.geometerplus.zlibrary.ui.android
|
||||
com.morphoss.acal_30.apk com.morphoss.acal
|
||||
com.android.keepass_64.apk com.android.keepass
|
||||
at.tomtasche.reader_11.apk at.tomtasche.reader
|
||||
aarddict.android_10.apk aarddict.android
|
||||
k9-3.403-release.apk com.fsck.k9
|
||||
com.jadn.cc_129.apk com.jadn.cc
|
||||
MissileIntercept.apk com.kirit.android.mintercept
|
||||
com.android.keepass_83.apk com.android.keepass
|
||||
org.eehouse.android.xw4_30.apk org.eehouse.android.xw4
|
||||
com.google.code.appsorganizer_162.apk com.google.code.appsorganizer
|
||||
Ringdroid-2.4-rc2.apk com.ringdroid
|
||||
mixare-0061.apk org.mixare
|
||||
vu.de.urpool.quickdroid_31.apk vu.de.urpool.quickdroid
|
||||
org.geometerplus.zlibrary.ui.android_9915.apk org.geometerplus.zlibrary.ui.android
|
||||
org.mythdroid_4.apk org.mythdroid
|
||||
net.cactii.mathdoku_70.apk net.cactii.mathdoku
|
||||
org.fdroid.taskstrid_170.apk org.fdroid.taskstrid
|
||||
BarcodeScanner3.5.apk com.google.zxing.client.android
|
||||
tuxrider_1.0.4.apk com.drodin.tuxrider
|
||||
mustard-0.3.0.apk org.mustard.android
|
||||
org.coolreader_247.apk org.coolreader
|
||||
k9-3.206-release.apk com.fsck.k9
|
||||
org.coolreader_176.apk org.coolreader
|
||||
com.google.android.diskusage_2005.apk com.google.android.diskusage
|
||||
mustard-0.2.0.apk org.mustard.android
|
||||
FBReaderJ-0.99.4.apk org.geometerplus.zlibrary.ui.android
|
||||
fennec-6.0.multi.eabi-arm.apk org.mozilla.firefox
|
||||
org.coolreader_131.apk org.coolreader
|
||||
org.coolreader_69.apk org.coolreader
|
||||
org.fdroid.fdroid_11.apk org.fdroid.fdroid
|
||||
FDroid_0.14.apk org.fdroid.fdroid
|
||||
org.ttrssreader_880.apk org.ttrssreader
|
||||
com.andrewshu.android.reddit_69.apk com.andrewshu.android.reddit
|
||||
com.andrewshu.android.reddit_73.apk com.andrewshu.android.reddit
|
||||
OpenGPSTracker-0.9.24.apk nl.sogeti.android.gpstracker
|
||||
sms-backup-plus-v1.3.4.apk com.zegoggles.smssync
|
||||
org.ttrssreader_1050.apk org.ttrssreader
|
||||
info.guardianproject.browser_3.apk info.guardianproject.browser
|
||||
com.gpl.rpg.AndorsTrail_20.apk com.gpl.rpg.AndorsTrail
|
||||
Audalyzer_1.14.apk org.hermit.audalyzer
|
||||
cz.romario.opensudoku_1105.apk cz.romario.opensudoku
|
||||
mustard-0.1.12b.apk org.mustard.android
|
||||
MyTracks_1.0.19.apk com.google.android.maps.mytracks
|
||||
org.geometerplus.zlibrary.ui.android_101091.apk org.geometerplus.zlibrary.ui.android
|
||||
net.tapi.handynotes_1.apk net.tapi.handynotes
|
||||
de.shandschuh.sparserss_69.apk de.shandschuh.sparserss
|
||||
regalandroid-1.0.0-20101204.212606-5.apk net.dahanne.android.regalandroid
|
||||
org.sixgun.ponyexpress_11.apk org.sixgun.ponyexpress
|
||||
MandelbrotMap.apk com.alfray.mandelbrot2
|
||||
com.eleybourn.bookcatalogue_51.apk com.eleybourn.bookcatalogue
|
||||
APG-1.0.7-release.apk org.thialfihar.android.apg
|
||||
CSipSimple-0.02-03.apk com.csipsimple
|
||||
org.geometerplus.zlibrary.ui.android_102041.apk org.geometerplus.zlibrary.ui.android
|
||||
Sipdroid-1.6.1.apk org.sipdroid.sipua
|
||||
com.ghostsq.commander_110.apk com.ghostsq.commander
|
||||
com.android.inputmethod.norwegian_15.apk com.android.inputmethod.norwegian
|
||||
edu.nyu.cs.omnidroid.app_6.apk edu.nyu.cs.omnidroid.app
|
||||
com.boardgamegeek_21.apk com.boardgamegeek
|
||||
transdroid-0.22.0.apk org.transdroid
|
||||
de.shandschuh.slightbackup_13.apk de.shandschuh.slightbackup
|
||||
org.ttrssreader_973.apk org.ttrssreader
|
||||
org.fosdem_4.apk org.fosdem
|
||||
com.replica.replicaisland_14.apk com.replica.replicaisland
|
||||
org.fdroid.fdroid_8.apk org.fdroid.fdroid
|
||||
Timeriffic_v1.09.04_20101120a.apk com.alfray.timeriffic
|
||||
org.ttrssreader_1075.apk org.ttrssreader
|
||||
com.eleybourn.bookcatalogue_36.apk com.eleybourn.bookcatalogue
|
||||
se.peterbjorkman.android.trafikinfo_13.apk se.peterbjorkman.android.trafikinfo
|
||||
linphone-android-1.0.15.apk org.linphone
|
||||
org.ttrssreader_860.apk org.ttrssreader
|
@ -460,6 +460,12 @@ if repo_keyalias != None:
|
||||
iconfilename = os.path.join(icon_dir, os.path.basename(repo_icon))
|
||||
shutil.copyfile(repo_icon, iconfilename)
|
||||
|
||||
#Update known apks info...
|
||||
knownapks = common.KnownApks()
|
||||
for apk in apks:
|
||||
knownapks.recordapk(apk['apkname'], apk['id'])
|
||||
knownapks.writeifchanged()
|
||||
|
||||
print "Finished."
|
||||
print str(apps_inrepo) + " apps in repo"
|
||||
print str(apps_disabled) + " disabled"
|
||||
|
132
updatestats.py
Executable file
132
updatestats.py
Executable file
@ -0,0 +1,132 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# updatestats.py - part of the FDroid server tools
|
||||
# Copyright (C) 2010-12, Ciaran Gultnieks, ciaran@ciarang.com
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import shutil
|
||||
import re
|
||||
import urllib
|
||||
import time
|
||||
import traceback
|
||||
import glob
|
||||
from optparse import OptionParser
|
||||
import HTMLParser
|
||||
import paramiko
|
||||
import common
|
||||
|
||||
#Read configuration...
|
||||
execfile('config.py')
|
||||
|
||||
|
||||
# Parse command line...
|
||||
parser = OptionParser()
|
||||
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||
help="Spew out even more information than normal")
|
||||
parser.add_option("-d", "--download", action="store_true", default=False,
|
||||
help="Download logs we don't have")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
|
||||
statsdir = 'stats'
|
||||
logsdir = os.path.join(statsdir, 'logs')
|
||||
logsarchivedir = os.path.join(logsdir, 'archive')
|
||||
datadir = os.path.join(statsdir, 'data')
|
||||
if not os.path.exists(statsdir):
|
||||
os.mkdir(statsdir)
|
||||
if not os.path.exists(logsdir):
|
||||
os.mkdir(logsdir)
|
||||
if not os.path.exists(datadir):
|
||||
os.mkdir(datadir)
|
||||
|
||||
if options.download:
|
||||
# Get any access logs we don't have...
|
||||
ssh = None
|
||||
ftp = None
|
||||
try:
|
||||
print 'Retrieving logs'
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.load_system_host_keys()
|
||||
ssh.connect('f-droid.org', username='fdroid', timeout=10,
|
||||
key_filename=webserver_keyfile)
|
||||
ftp = ssh.open_sftp()
|
||||
ftp.get_channel().settimeout(15)
|
||||
print "...connected"
|
||||
|
||||
ftp.chdir('logs')
|
||||
files = ftp.listdir()
|
||||
for file in files:
|
||||
if file.startswith('access-') and file.endswith('.log'):
|
||||
|
||||
destpath = os.path.join(logsdir, file)
|
||||
archivepath = os.path.join(logsarchivedir, file + '.gz')
|
||||
if os.path.exists(archivepath):
|
||||
if os.path.exists(destpath):
|
||||
# Just in case we have it archived but failed to remove
|
||||
# the original...
|
||||
os.remove(destpath)
|
||||
else:
|
||||
destsize = ftp.stat(file).st_size
|
||||
if (not os.path.exists(destpath) or
|
||||
os.path.getsize(destpath) != destsize):
|
||||
print "...retrieving " + file
|
||||
ftp.get(file, destpath)
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
finally:
|
||||
#Disconnect
|
||||
if ftp != None:
|
||||
ftp.close()
|
||||
if ssh != None:
|
||||
ssh.close()
|
||||
|
||||
# Process logs
|
||||
logexpr = '(?P<ip>[.:0-9a-fA-F]+) - - \[(?P<time>.*?)\] "GET (?P<uri>.*?) HTTP/1.\d" (?P<statuscode>\d+) \d+ "(?P<referral>.*?)" "(?P<useragent>.*?)"'
|
||||
logsearch = re.compile(logexpr).search
|
||||
apps = {}
|
||||
unknownapks = []
|
||||
knownapks = common.KnownApks()
|
||||
for logfile in glob.glob(os.path.join(logsdir,'access-*.log')):
|
||||
logdate = logfile[len(logsdir) + 1 + len('access-'):-4]
|
||||
matches = (logsearch(line) for line in file(logfile))
|
||||
for match in matches:
|
||||
if match and match.group('statuscode') == '200':
|
||||
uri = match.group('uri')
|
||||
if uri.endswith('.apk'):
|
||||
_, apkname = os.path.split(uri)
|
||||
app = knownapks.getapp(apkname)
|
||||
if app:
|
||||
if app in apps:
|
||||
apps[app] += 1
|
||||
else:
|
||||
apps[app] = 1
|
||||
else:
|
||||
if not apkname in unknownapks:
|
||||
unknownapks.append(apkname)
|
||||
|
||||
for app, count in apps.iteritems():
|
||||
print app + " " + str(count)
|
||||
|
||||
if len(unknownapks) > 0:
|
||||
print '\nUnknown apks:'
|
||||
for apk in unknownapks:
|
||||
print apk
|
||||
|
||||
print "Finished."
|
||||
|
Loading…
Reference in New Issue
Block a user