X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/5415e49eed84b2b6671221289fde8e989174a011..1bc290ecce828f4a28d096c383815d2aa9199253:/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 e72840290..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,17 +59,17 @@ 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 -information, see the project wiki. +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,27 +95,27 @@ information, see th

- 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 + You can process the file + 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.

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. + the available extracts + (individual countries or states) from third parties.

-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. +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()