1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

Add stats/disabled_apps.txt (closes #87)

This commit is contained in:
Daniel Martí 2015-04-20 18:20:24 +02:00
parent 504163b170
commit 41539d6a1b

View File

@ -71,7 +71,8 @@ def main():
sys.exit(1) sys.exit(1)
# Get all metadata-defined apps... # Get all metadata-defined apps...
metaapps = [a for a in metadata.read_metadata().itervalues() if not a['Disabled']] allmetaapps = [a for a in metadata.read_metadata().itervalues()]
metaapps = [a for a in allmetaapps if not a['Disabled']]
statsdir = 'stats' statsdir = 'stats'
logsdir = os.path.join(statsdir, 'logs') logsdir = os.path.join(statsdir, 'logs')
@ -283,6 +284,14 @@ def main():
f.write(license + ' ' + str(count) + '\n') f.write(license + ' ' + str(count) + '\n')
f.close() f.close()
# Write list of disabled apps...
logging.info("Processing disabled apps...")
disabled = [a['id'] for a in allmetaapps if a['Disabled']]
f = open('stats/disabled_apps.txt', 'w')
for appid in sorted(disabled):
f.write(appid + '\n')
f.close()
# Write list of latest apps added to the repo... # Write list of latest apps added to the repo...
logging.info("Processing latest apps...") logging.info("Processing latest apps...")
latest = knownapks.getlatest(10) latest = knownapks.getlatest(10)