def main():
# Read configuration...
+ global update_stats
+ update_stats = False
execfile('config.py', globals())
+ if not update_stats:
+ print "Stats are disabled - check your configuration"
+ sys.exit(1)
+
# Parse command line...
parser = OptionParser()
parser.add_option("-v", "--verbose", action="store_true", default=False,
def main():
# Read configuration...
+ global update_stats
+ update_stats = False
execfile('config.py', globals())
# Parse command line...
f.write(catdata)
f.close()
- # Update known apks info...
- knownapks.writeifchanged()
-
- # Generate latest apps data for widget
- if os.path.exists(os.path.join('stats', 'latestapps.txt')):
- data = ''
- for line in file(os.path.join('stats', 'latestapps.txt')):
- appid = line.rstrip()
- data += appid + "\t"
- for app in apps:
- if app['id'] == appid:
- data += app['Name'] + "\t"
- data += app['icon'] + "\t"
- data += app['License'] + "\n"
- break
- f = open('repo/latestapps.dat', 'w')
- f.write(data)
- f.close()
+ if update_stats:
+
+ # Update known apks info...
+ knownapks.writeifchanged()
+
+ # Generate latest apps data for widget
+ if os.path.exists(os.path.join('stats', 'latestapps.txt')):
+ data = ''
+ for line in file(os.path.join('stats', 'latestapps.txt')):
+ appid = line.rstrip()
+ data += appid + "\t"
+ for app in apps:
+ if app['id'] == appid:
+ data += app['Name'] + "\t"
+ data += app['icon'] + "\t"
+ data += app['License'] + "\n"
+ break
+ f = open('repo/latestapps.dat', 'w')
+ f.write(data)
+ f.close()
# Update the wiki...
if options.wiki: