feat(onomastics): add documentation route to server

This commit is contained in:
2021-12-01 09:42:11 +01:00
parent a8bf85b169
commit 8945430f27

View File

@@ -4,6 +4,18 @@ import geogen.client
app = Flask(__name__) app = Flask(__name__)
@app.route("/")
def help():
return """Welcome to Kierán's surname cartographer!
The following routes are available to you:
- /NAME/absolute.svg displays a map of the absolute distribution of a surname
- /NAME/relative.svg displays a map of the relative distribution of a surname (divided by population of a landkreis)
- /NAME/data.csv returns the raw data, grouped by Landkreis
"""
@app.route("/<name>/relative.svg") @app.route("/<name>/relative.svg")
def relative(name): def relative(name):
color = request.args.get("color") or "navy" color = request.args.get("color") or "navy"