Skip to content

Instantly share code, notes, and snippets.

@lukasmartinelli
Created January 5, 2017 16:32
Show Gist options
  • Save lukasmartinelli/8b91ed9b038954d90e9ad46a62ae53d6 to your computer and use it in GitHub Desktop.
Save lukasmartinelli/8b91ed9b038954d90e9ad46a62ae53d6 to your computer and use it in GitHub Desktop.
Generate Layer READMEs for OpenMapTiles
#!/bin/bash
set -o errexit
set -o nounset
function layer_readme() {
local layer="$1"
echo "## $layer" > $layer/README.md
echo "" >> $layer/README.md
echo "### Docs" >> $layer/README.md
echo "Read the layer documentation at **http://openmaptiles.org/schema#$layer**" >> $layer/README.md
echo "" >> $layer/README.md
echo "### Mapping Diagram" >> $layer/README.md
echo "![Mapping diagram for $layer](http://openmaptiles.org/media/mapping_$layer.png)" >> $layer/README.md
echo "" >> $layer/README.md
echo "### ETL diagram" >> $layer/README.md
echo "![ETL diagram for $layer](http://openmaptiles.org/media/etl_$layer.png)" >> $layer/README.md
echo "" >> $layer/README.md
}
layer_readme 'aeroway'
layer_readme 'boundary'
layer_readme 'building'
layer_readme 'housenumber'
layer_readme 'landcover'
layer_readme 'landuse'
layer_readme 'park'
layer_readme 'place'
layer_readme 'poi'
layer_readme 'transportation'
layer_readme 'transportation_name'
layer_readme 'water'
layer_readme 'water_name'
layer_readme 'waterway'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment