From a35a0006d5bf902231a2fe670578ecd979002594 Mon Sep 17 00:00:00 2001 From: Robert Forkel Date: Thu, 23 May 2024 17:17:58 +0200 Subject: [PATCH] polishing --- README.md | 15 +++++++++ src/cldfgeojson/commands/overlay.py | 2 +- .../commands/templates/index.html.mako | 32 +++++++++---------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index de52ae9..d30240b 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,18 @@ pip install cldfgeojson The functionality in [`cldfgeojson.create`](src/cldfgeojson/create.py) helps adding speaker area information when creating CLDF datasets (e.g. with [`cldfbench`](https://github.com/cldf/cldfbench)). + + + +## `leaflet.draw` + +This package contains the [`leaflet.draw`](https://github.com/Leaflet/Leaflet.draw) plugin in the form of `data://` URLs in +[a mako template](src/cldfgeojson/commands/templates/leaflet.draw.mako). `leaflet.draw` is +distributed under a MIT license: + +> Copyright 2012-2017 Jon West, Jacob Toye, and Leaflet +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + diff --git a/src/cldfgeojson/commands/overlay.py b/src/cldfgeojson/commands/overlay.py index b2c27bf..aeee708 100644 --- a/src/cldfgeojson/commands/overlay.py +++ b/src/cldfgeojson/commands/overlay.py @@ -62,7 +62,7 @@ def run(args): html = tmpl.render( img=data_url(img, 'image/jpeg') if isinstance(img, pathlib.Path) else img, - bounds = bounds['bbox'], + bounds=bounds['bbox'], geojson=json.dumps(dict({n.stem: load(n) for n in args.geojson})), with_draw=args.with_draw, ) diff --git a/src/cldfgeojson/commands/templates/index.html.mako b/src/cldfgeojson/commands/templates/index.html.mako index df343aa..cad7f2e 100644 --- a/src/cldfgeojson/commands/templates/index.html.mako +++ b/src/cldfgeojson/commands/templates/index.html.mako @@ -57,18 +57,20 @@