]> git.openstreetmap.org Git - chef.git/commitdiff
Convert planet HEADER scripts to python 3
authorTom Hughes <tom@compton.nu>
Mon, 18 Jul 2022 07:23:02 +0000 (08:23 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 18 Jul 2022 07:23:02 +0000 (08:23 +0100)
cookbooks/planet/files/default/ccbysa_history_cgi/HEADER.cgi
cookbooks/planet/files/default/cgi/HEADER.cgi
cookbooks/planet/files/default/history_cgi/HEADER.cgi
cookbooks/planet/files/default/replication-cgi/HEADER.cgi

index 6d1810e63f1fb4d6d76cb6c5d53437ec0632fb94..b4a46ba9fffb89c5894f29ed36648f10bf87bbaa 100644 (file)
@@ -1,6 +1,6 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 
-print """
+print("""
 <html>
  <head>
   <title>OpenStreetMap historical CC BY-SA 2.0 licensed data</title>
 <html>
  <head>
   <title>OpenStreetMap historical CC BY-SA 2.0 licensed data</title>
@@ -13,4 +13,4 @@ print """
 <p>The <tt>full-planet-120401-final.osm.bz2</tt> file is the last dump of data before <a href="https://blog.osmfoundation.org/2012/07/26/automated-redactions-complete/">redactions were run to remove data which could not be released under ODbL</a>. The <tt>full-planet-120601-1150.osm.bz2</tt> 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.</p>
 <p>Licensed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a></p>
 <p>&nbsp;</p>
 <p>The <tt>full-planet-120401-final.osm.bz2</tt> file is the last dump of data before <a href="https://blog.osmfoundation.org/2012/07/26/automated-redactions-complete/">redactions were run to remove data which could not be released under ODbL</a>. The <tt>full-planet-120601-1150.osm.bz2</tt> 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.</p>
 <p>Licensed under the <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a></p>
 <p>&nbsp;</p>
-"""
+""")
index 7955d4718ff9a1c73cd734a51c92048cbb4752b3..d71c3c5aa2c1ce8b88c5fa1b3b8baf40b630809c 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from time import time
 from os import stat, environ
 
 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')
 
 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("""
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
  <head>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
  <head>
@@ -133,4 +133,4 @@ database, and those published before the 12 September 2012 are distributed under
 <p>
 If you find data within OpenStreetMap that you believe is an infringement of someone else's copyright, then please make contact with the <a href="https://wiki.openstreetmap.org/wiki/Data_working_group">OpenStreetMap Data Working Group</a>.
 </p>
 <p>
 If you find data within OpenStreetMap that you believe is an infringement of someone else's copyright, then please make contact with the <a href="https://wiki.openstreetmap.org/wiki/Data_working_group">OpenStreetMap Data Working Group</a>.
 </p>
-""" % locals()
+""" % locals())
index b713338cbcef6f345906f0001dd94a07ca372a9a..4b64cfc6e7a3c682e243be698d46e115b1a8ea28 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 from time import time
 from os import stat, environ
 
 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')
 
 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("""
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
  <head>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
  <head>
@@ -118,4 +118,4 @@ information, <a href="https://wiki.openstreetmap.org/wiki/Planet.osm/full">see t
 <p>
 If you find data within OpenStreetMap that you believe is an infringement of someone else's copyright, then please make contact with the <a href="https://wiki.openstreetmap.org/wiki/Data_working_group">OpenStreetMap Data Working Group</a>.
 </p>
 <p>
 If you find data within OpenStreetMap that you believe is an infringement of someone else's copyright, then please make contact with the <a href="https://wiki.openstreetmap.org/wiki/Data_working_group">OpenStreetMap Data Working Group</a>.
 </p>
-""" % locals()
+""" % locals())
index 269ce0f7235d0fde11398ba6892f22ab33ad77af..5e00a78e14d739c0e12a808345014bea9b178151 100644 (file)
@@ -1,6 +1,6 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 
 
-print """
+print("""
 <html>
  <head>
   <title>OpenStreetMap replication diffs</title>
 <html>
  <head>
   <title>OpenStreetMap replication diffs</title>
@@ -11,4 +11,4 @@ print """
 <h1>planet.openstreetmap.org - replication diffs</h1>
 <p>OpenStreetMap is <i>open data</i>, licensed under the <a href="https://opendatacommons.org/licenses/odbl/">Open Data Commons Open Database License</a> (ODbL)</p>
 <p>&nbsp;</p>
 <h1>planet.openstreetmap.org - replication diffs</h1>
 <p>OpenStreetMap is <i>open data</i>, licensed under the <a href="https://opendatacommons.org/licenses/odbl/">Open Data Commons Open Database License</a> (ODbL)</p>
 <p>&nbsp;</p>
-"""
+""")