X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/c249fadcc5ce27698d1f11fe5ec4a1c299786b3c..1bc290ecce828f4a28d096c383815d2aa9199253:/cookbooks/planet/files/default/history_cgi/HEADER.cgi?ds=sidebyside diff --git a/cookbooks/planet/files/default/history_cgi/HEADER.cgi b/cookbooks/planet/files/default/history_cgi/HEADER.cgi index 51ac84581..b713338cb 100755 --- a/cookbooks/planet/files/default/history_cgi/HEADER.cgi +++ b/cookbooks/planet/files/default/history_cgi/HEADER.cgi @@ -10,7 +10,7 @@ def nice_size(file): MB = 1024. * KB GB = 1024. * MB TB = 1024. * GB - + if size < KB: size, suffix = size, '' elif size < MB: @@ -21,7 +21,7 @@ def nice_size(file): size, suffix = size/GB, 'GB' else: size, suffix = size/TB, 'TB' - + if size < 10: return '%.1f %s' % (round(size,1), suffix) else: @@ -44,11 +44,12 @@ 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') @@ -58,16 +59,16 @@ print """ Index of /planet/full-history - + - +

Planet OSM

The files found here are complete copies of the OpenStreetMap.org -database, including editing history. These are published under an -Open Data Commons Open Database License 1.0 licensed. For more +database, including editing history. These are published under an +Open Data Commons Open Database License 1.0 licensed. For more information, see the project wiki.

@@ -94,13 +95,13 @@ information, see t

- You are granted permission to use OpenStreetMap data by - the OpenStreetMap License, which also describes + You are granted permission to use OpenStreetMap data by + the OpenStreetMap License, which also describes your obligations.

You can process the file - or extracts with a variety of tools, although some tools for processing OSM data will + or extracts with a variety of tools, although some tools for processing OSM data will only work on 'current' planets and will not process a 'history' planet available here.

@@ -108,7 +109,7 @@ information, see t

The complete history planet is extremely large, so you may prefer to use one of the available extracts - (individual countries or states) from third parties. + (individual countries or states) from third parties.