Created
January 5, 2017 16:32
-
-
Save lukasmartinelli/8b91ed9b038954d90e9ad46a62ae53d6 to your computer and use it in GitHub Desktop.
Generate Layer READMEs for OpenMapTiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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