From: Tom Hughes Date: Mon, 18 Jul 2022 07:23:02 +0000 (+0100) Subject: Convert planet HEADER scripts to python 3 X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/90b601cad3220365064a9936413ace6a06a25f4b?hp=9b180c8f97133f80c6fd858e32728c8f1efd2768 Convert planet HEADER scripts to python 3 --- diff --git a/cookbooks/planet/files/default/ccbysa_history_cgi/HEADER.cgi b/cookbooks/planet/files/default/ccbysa_history_cgi/HEADER.cgi index 6d1810e63..b4a46ba9f 100644 --- a/cookbooks/planet/files/default/ccbysa_history_cgi/HEADER.cgi +++ b/cookbooks/planet/files/default/ccbysa_history_cgi/HEADER.cgi @@ -1,6 +1,6 @@ -#!/usr/bin/env python +#!/usr/bin/python3 -print """ +print(""" OpenStreetMap historical CC BY-SA 2.0 licensed data @@ -13,4 +13,4 @@ print """

The full-planet-120401-final.osm.bz2 file is the last dump of data before redactions were run to remove data which could not be released under ODbL. The full-planet-120601-1150.osm.bz2 is the last dump of data available under CC BY-SA, but after the redactions were run. This means it may have less data in some areas, although many redactions were quickly re-mapped.

Licensed under the CC BY-SA 2.0

 

-""" +""") diff --git a/cookbooks/planet/files/default/cgi/HEADER.cgi b/cookbooks/planet/files/default/cgi/HEADER.cgi index 7955d4718..d71c3c5aa 100644 --- a/cookbooks/planet/files/default/cgi/HEADER.cgi +++ b/cookbooks/planet/files/default/cgi/HEADER.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from time import time from os import stat, environ @@ -55,7 +55,7 @@ planet_link = file_info('planet/planet-latest.osm.bz2', 'planet/planet-bz2-rss.x changesets_link = file_info('planet/changesets-latest.osm.bz2', 'planet/changesets-bz2-rss.xml', 'Latest Weekly Changesets') planet_pbf_link = file_info('pbf/planet-latest.osm.pbf', 'pbf/planet-pbf-rss.xml', 'Latest Weekly Planet PBF File') -print """ +print(""" @@ -133,4 +133,4 @@ database, and those published before the 12 September 2012 are distributed under

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()) diff --git a/cookbooks/planet/files/default/history_cgi/HEADER.cgi b/cookbooks/planet/files/default/history_cgi/HEADER.cgi index b713338cb..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 @@ -54,7 +54,7 @@ def file_info(file, name): 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(""" @@ -118,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()) diff --git a/cookbooks/planet/files/default/replication-cgi/HEADER.cgi b/cookbooks/planet/files/default/replication-cgi/HEADER.cgi index 269ce0f72..5e00a78e1 100644 --- a/cookbooks/planet/files/default/replication-cgi/HEADER.cgi +++ b/cookbooks/planet/files/default/replication-cgi/HEADER.cgi @@ -1,6 +1,6 @@ -#!/usr/bin/env python +#!/usr/bin/python3 -print """ +print(""" OpenStreetMap replication diffs @@ -11,4 +11,4 @@ print """

planet.openstreetmap.org - replication diffs

OpenStreetMap is open data, licensed under the Open Data Commons Open Database License (ODbL)

 

-""" +""")