diff --git a/README.md b/README.md index 22d85db6..573e1f4e 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,10 @@ AI for precise geospatial data analysis and visualization. pip install blue-geo ``` -πŸ”Ή 🧊 [datacube](https://github.com/kamangir/blue-geo/tree/main/blue_geo/.abcli/datacube) πŸ”Ή - -| | | | -|-|-|-| -| 🌐 [QGIS](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/QGIS/README.md) | πŸ‡ΊπŸ‡¦ [ukraine-timemap](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/ukraine-timemap/README.md) | 🌈 [vancouver-watching](https://github.com/kamangir/Vancouver-Watching) | -| [![image](https://raw.githubusercontent.com/kamangir/assets/main/blue-geo/QGIS.jpg)](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/QGIS/README.md) | [![image](https://github.com/kamangir/assets/blob/main/nbs/ukraine-timemap/QGIS.png?raw=true)](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/ukraine-timemap/README.md) | [![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif?raw=true)](https://github.com/kamangir/Vancouver-Watching) | -| an AI terraform for [QGIS](https://www.qgis.org/). | `ingest` for the [Bellingcat](https://www.bellingcat.com/) [Civilian Harm in Ukraine TimeMap](https://github.com/bellingcat/ukraine-timemap) dataset, available through [this UI](https://ukraine.bellingcat.com/) and [this API](https://bellingcat-embeds.ams3.cdn.digitaloceanspaces.com/production/ukr/timemap/api.json). | 🌈 Vancouver watching with AI, last build: [πŸ”—](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif). | | -| | | | -| 🌐 [firms](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/datacube/firms/README.md) | | | -| [![image](https://raw.githubusercontent.com/kamangir/assets/main/blue-geo/firms.jpg)](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/datacube/firms/README.md) | | | -| `ingest` for [FIRMS](https://firms.modaps.eosdis.nasa.gov): Fire Information for Resource Management System. | | | +| | | | +| --- | --- | --- | +| 🌐[`QGIS`](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/QGIS/README.md) [![image](https://raw.githubusercontent.com/kamangir/assets/main/blue-geo/QGIS.jpg)](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/QGIS/README.md) an AI terraform for [QGIS](https://www.qgis.org/). | 🧊[`datacube`](https://github.com/kamangir/blue-geo/tree/main/blue_geo/.abcli/datacube) [![image](https://github.com/kamangir/assets/blob/main/blue-geo/datacube.png?raw=true)](https://github.com/kamangir/blue-geo/tree/main/blue_geo/.abcli/datacube) a datacube for geospatial AI | 🌐[`firms-area`](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/datacube/firms/README.md) [![image](https://raw.githubusercontent.com/kamangir/assets/main/blue-geo/datacube-firms_area.jpg)](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/datacube/firms/README.md) Fire Information for Resource Management System ([FIRMS](https://firms.modaps.eosdis.nasa.gov)) datacubes. | +| πŸ‡ΊπŸ‡¦[`ukraine-timemap`](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/ukraine-timemap/README.md) [![image](https://github.com/kamangir/assets/blob/main/nbs/ukraine-timemap/QGIS.png?raw=true)](https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/ukraine-timemap/README.md) `ingest` for the [Bellingcat](https://www.bellingcat.com/) [Civilian Harm in Ukraine TimeMap](https://github.com/bellingcat/ukraine-timemap) dataset, available through [this UI](https://ukraine.bellingcat.com/) and [this API](https://bellingcat-embeds.ams3.cdn.digitaloceanspaces.com/production/ukr/timemap/api.json). | 🌈[`vancouver-watching`](https://github.com/kamangir/Vancouver-Watching) [![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif?raw=true)](https://github.com/kamangir/Vancouver-Watching) 🌈 Vancouver watching with AI, last build: [πŸ”—](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif). | | --- @@ -27,3 +20,6 @@ pip install blue-geo --- To use on [AWS SageMaker](https://aws.amazon.com/sagemaker/) replace `` with the name of the plugin and follow [these instructions](https://github.com/kamangir/notebooks-and-scripts/blob/main/SageMaker.md). + +--- +built by [`abcli-9.182.1-markdown-2024-07-21-a`](https://github.com/kamangir/awesome-bash-cli), based on [`blue_geo-4.122.1`](https://github.com/kamangir/blue_plugin). diff --git a/blue_geo/README.py b/blue_geo/README.py new file mode 100644 index 00000000..7b1ba4d3 --- /dev/null +++ b/blue_geo/README.py @@ -0,0 +1,88 @@ +import os +import abcli +from abcli import file +from abcli.file.functions import build_from_template +from abcli.plugins import markdown +from blue_geo import NAME, VERSION, ICON +from blue_geo.logger import logger + +features = { + "QGIS": { + "description": "an AI terraform for [QGIS](https://www.qgis.org/).", + "icon": "🌐", + "thumbnail": "https://raw.githubusercontent.com/kamangir/assets/main/blue-geo/QGIS.jpg", + "url": "https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/QGIS/README.md", + }, + "datacube": { + "description": "a datacube for geospatial AI", + "icon": "🧊", + "thumbnail": "https://github.com/kamangir/assets/blob/main/blue-geo/datacube.png?raw=true", + "url": "https://github.com/kamangir/blue-geo/tree/main/blue_geo/.abcli/datacube", + }, + "firms-area": { + "description": "Fire Information for Resource Management System ([FIRMS](https://firms.modaps.eosdis.nasa.gov)) datacubes.", + "icon": "🌐", + "thumbnail": "https://raw.githubusercontent.com/kamangir/assets/main/blue-geo/datacube-firms_area.jpg", + "url": "https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/datacube/firms/README.md", + }, + "ukraine-timemap": { + "description": "`ingest` for the [Bellingcat](https://www.bellingcat.com/) [Civilian Harm in Ukraine TimeMap](https://github.com/bellingcat/ukraine-timemap) dataset, available through [this UI](https://ukraine.bellingcat.com/) and [this API](https://bellingcat-embeds.ams3.cdn.digitaloceanspaces.com/production/ukr/timemap/api.json).", + "icon": "πŸ‡ΊπŸ‡¦", + "thumbnail": "https://github.com/kamangir/assets/blob/main/nbs/ukraine-timemap/QGIS.png?raw=true", + "url": "https://github.com/kamangir/blue-geo/blob/main/blue_geo/.abcli/ukraine-timemap/README.md", + }, + "vancouver-watching": { + "description": "🌈 Vancouver watching with AI, last build: [πŸ”—](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif).", + "icon": "🌈", + "thumbnail": "https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif?raw=true", + "url": "https://github.com/kamangir/Vancouver-Watching", + }, + "template": { + "description": "", + "icon": "", + "thumbnail": "", + "url": "", + }, +} + + +def build(filename: str = ""): + if not filename: + filename = os.path.join(file.path(__file__), "../README.md") + + logger.info(f"{NAME}.build: {filename}") + + items = [ + "{}[`{}`]({}) [![image]({})]({}) {}".format( + details["icon"], + feature, + details["url"], + details["thumbnail"], + details["url"], + details["description"], + ) + for feature, details in features.items() + if feature != "template" + ] + + table = markdown.generate_table(items) + + signature = [ + "---", + "built by [`{}`]({}), based on [`{}-{}`]({}).".format( + abcli.fullname(), + "https://github.com/kamangir/awesome-bash-cli", + NAME, + VERSION, + "https://github.com/kamangir/blue_plugin", + ), + ] + + return file.build_from_template( + os.path.join(file.path(__file__), "./assets/README.md"), + { + "--table--": table, + "--signature": signature, + }, + filename, + ) diff --git a/blue_geo/__init__.py b/blue_geo/__init__.py index 6d1fa50a..94af6771 100644 --- a/blue_geo/__init__.py +++ b/blue_geo/__init__.py @@ -4,7 +4,7 @@ DESCRIPTION = f"{ICON} AI for precise geospatial data analysis and visualization." -VERSION = "4.122.1" +VERSION = "4.123.1" REPO_NAME = "blue-geo" diff --git a/blue_geo/__main__.py b/blue_geo/__main__.py index 8d89b5fe..542b7997 100644 --- a/blue_geo/__main__.py +++ b/blue_geo/__main__.py @@ -1,9 +1,17 @@ from blue_geo import NAME, VERSION, DESCRIPTION, ICON from blue_geo.logger import logger +from blue_geo import README from blueness.argparse.generic import main -success, message = main(__file__, NAME, VERSION, DESCRIPTION, ICON) +success, message = main( + __file__, + NAME, + VERSION, + DESCRIPTION, + ICON, + { + "build_README": lambda _: README.build(), + }, +) if not success: logger.error(message) - - diff --git a/blue_geo/assets/README.md b/blue_geo/assets/README.md new file mode 100644 index 00000000..a3f57e9e --- /dev/null +++ b/blue_geo/assets/README.md @@ -0,0 +1,21 @@ +# 🌐 Blue-GEO + +AI for precise geospatial data analysis and visualization. + +```bash +pip install blue-geo +``` + +--table-- + +--- + +[![PyPI version](https://img.shields.io/pypi/v/blue-geo.svg)](https://pypi.org/project/blue-geo/) + +πŸ“œ [metadata](./metadata.yaml) + +--- + +To use on [AWS SageMaker](https://aws.amazon.com/sagemaker/) replace `` with the name of the plugin and follow [these instructions](https://github.com/kamangir/notebooks-and-scripts/blob/main/SageMaker.md). + +--signature-- \ No newline at end of file