mirror of
https://github.com/correl/melpa.git
synced 2024-12-23 19:19:51 +00:00
rename data files in process_log.py script
This commit is contained in:
parent
4098d7fcbe
commit
e77648205e
1 changed files with 4 additions and 4 deletions
|
@ -92,8 +92,8 @@ def main():
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# load old data file
|
# load old data file
|
||||||
if os.path.exists("melpa_log_data.json.gz"):
|
if os.path.exists("download_log.json.gz"):
|
||||||
pkg_ip_time = json_load(gzip.open("melpa_log_data.json.gz"))
|
pkg_ip_time = json_load(gzip.open("download_log.json.gz"))
|
||||||
else:
|
else:
|
||||||
pkg_ip_time = {}
|
pkg_ip_time = {}
|
||||||
|
|
||||||
|
@ -106,12 +106,12 @@ def main():
|
||||||
sys.stdout.write("{0}\n".format(count))
|
sys.stdout.write("{0}\n".format(count))
|
||||||
|
|
||||||
# dump new data file
|
# dump new data file
|
||||||
json_dump(pkg_ip_time, gzip.open("melpa_log_data.json.gz", 'w'))
|
json_dump(pkg_ip_time, gzip.open("download_log.json.gz", 'w'))
|
||||||
|
|
||||||
# calculate current package totals
|
# calculate current package totals
|
||||||
pkgcount = {p: len(i) for p, i in pkg_ip_time.iteritems()}
|
pkgcount = {p: len(i) for p, i in pkg_ip_time.iteritems()}
|
||||||
|
|
||||||
json_dump(pkgcount, open("melpa_download_counts.json", 'w'), indent=1)
|
json_dump(pkgcount, open("download_counts.json", 'w'), indent=1)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue