From 4817130d268df7b5bd83bbc5fda0f1d5a75a0a09 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 17 Dec 2019 22:57:16 +0100 Subject: Add sync_to_cdn.sh and regenerate_index_html.py; refresh index.html --- index.html | 278 +++++++++++++++++++++++++++++++++++++++++++++++ index.html.in | 36 ++++++ regenerate_index_html.py | 59 ++++++++++ sync_to_cdn.sh | 10 ++ 4 files changed, 383 insertions(+) create mode 100644 index.html.in create mode 100644 regenerate_index_html.py create mode 100755 sync_to_cdn.sh diff --git a/index.html b/index.html index 1ab5e09..27cbe30 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,11 @@ + + + + + PROJ datumgrids @@ -11,5 +16,278 @@ This proj.cdn.org bucket, hosted by the contains the datasets of https://github.com/OSGeo/proj-datumgrid-geotiff/.

+

+Those files are designed to be mainly used by PROJ 7 or later. +

+

The bucket contains the following files:

+ +

+Total size of content: 463 MB +

+
+ +Powered by AWS Cloud Computing + for use by  + +PROJ +
diff --git a/index.html.in b/index.html.in new file mode 100644 index 0000000..3ba102e --- /dev/null +++ b/index.html.in @@ -0,0 +1,36 @@ + + + + + + +PROJ datumgrids + + + +

+This proj.cdn.org bucket, hosted by the +Amazon Public Datasets program, +contains the datasets of +https://github.com/OSGeo/proj-datumgrid-geotiff/. +

+

+Those files are designed to be mainly used by PROJ 7 or later. +

+

The bucket contains the following files:

+ +

+Total size of content: ${TOTAL_SIZE} +

+
+ +Powered by AWS Cloud Computing + for use by  + +PROJ +
+ + diff --git a/regenerate_index_html.py b/regenerate_index_html.py new file mode 100644 index 0000000..ebc3aa7 --- /dev/null +++ b/regenerate_index_html.py @@ -0,0 +1,59 @@ +from osgeo import gdal +import datetime +import glob +import os + +dirnames = [] +links = [] +for dirname in glob.glob('*'): + if not os.path.isdir(dirname): + continue + dirnames.append(dirname) + +total_size = 0 +set_files = set() +for dirname in sorted(dirnames): + filenames = [] + readme_filename = None + for f in glob.glob(dirname + '/*'): + f = os.path.basename(f) + if f.startswith('README'): + assert not readme_filename + readme_filename = f + else: + filenames.append(f) + links.append('