X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2f3b011059e99fc2069683e1291e26e30de32ca2..9b4b2aab7e2feeb21beeff9bce1e466d9c38dba5:/cookbooks/planet/files/default/history_cgi/HEADER.cgi diff --git a/cookbooks/planet/files/default/history_cgi/HEADER.cgi b/cookbooks/planet/files/default/history_cgi/HEADER.cgi index 460acd319..4b64cfc6e 100755 --- a/cookbooks/planet/files/default/history_cgi/HEADER.cgi +++ b/cookbooks/planet/files/default/history_cgi/HEADER.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from time import time from os import stat, environ @@ -44,16 +44,17 @@ def nice_time(time): return '%d months' % (time / 2592000.) def file_info(file, name): + torrent_file = file + '.torrent' size = nice_size(file) hash = search(r'\w{32}', open(file+'.md5', 'r').read()).group(0) date = nice_time(time() - stat(file).st_mtime) - return '%(name)s
%(size)s, created %(date)s ago.
md5: %(hash)s.' % locals() + return '%(name)s (torrent)
%(size)s, created %(date)s ago.
md5: %(hash)s.' % locals() planet_link = file_info('history-latest.osm.bz2', 'Latest Full History Planet XML File') planet_pbf_link = file_info('../../pbf/full-history/history-latest.osm.pbf', 'Latest Full History Planet PBF File') -print """ +print(""" @@ -117,4 +118,4 @@ information, see t

If you find data within OpenStreetMap that you believe is an infringement of someone else's copyright, then please make contact with the OpenStreetMap Data Working Group.

-""" % locals() +""" % locals())