Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geotribu/pyqgis-icons-cheatsheet
Script and tooling to convert QGIS embedded icons into a searchable website. Meant to be useful during QGIS plugin development (PyQGIS).
https://github.com/geotribu/pyqgis-icons-cheatsheet
cheatsheet geotribu pyqgis qgis-plugin qt-resource
Last synced: 5 days ago
JSON representation
Script and tooling to convert QGIS embedded icons into a searchable website. Meant to be useful during QGIS plugin development (PyQGIS).
- Host: GitHub
- URL: https://github.com/geotribu/pyqgis-icons-cheatsheet
- Owner: geotribu
- License: mit
- Created: 2023-02-01T20:11:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-10T11:49:25.000Z (26 days ago)
- Last Synced: 2024-12-24T05:08:51.113Z (12 days ago)
- Topics: cheatsheet, geotribu, pyqgis, qgis-plugin, qt-resource
- Language: Python
- Homepage: https://pyqgis-icons-cheatsheet.geotribu.fr/
- Size: 161 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PyQGIS icons cheatsheet generator
[![🚀 Build & publish](https://github.com/geotribu/pyqgis-icons-cheatsheet/actions/workflows/deploy.yml/badge.svg)](https://github.com/geotribu/pyqgis-icons-cheatsheet/actions/workflows/deploy.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![flake8](https://img.shields.io/badge/linter-flake8-green)](https://flake8.pycqa.org/)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/geotribu/pyqgis-icons-cheatsheet/main.svg)](https://results.pre-commit.ci/latest/github/geotribu/pyqgis-icons-cheatsheet/main)Script to convert a remote QRC (Qt Resources Collection files) into a markdown table to preview images.
This project covers [QGIS project](https://github.com/qgis/QGIS/) and generates a cheatsheet published on .
## Credits
Author: Julien M. (:octopus: [Guts on GitHub](https://github.com/guts/), :bird: [GeoJulien on Twitter](https://twitter.com/geojulien/)) for [Geotribu collaborative website](http://geotribu.fr).
Code under MIT license.
Content and methodolgy under [Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/).
Website [icon by Arunmozhi](https://commons.wikimedia.org/wiki/File:PyQgis_Logo_Illustration.png), CC BY-SA 4.0 , via Wikimedia Commons.### Related plugin
There is also a [plugin that allow to browse resources right into QGIS](https://guts.github.io/qgis-plugin-resource-browser/). [Don't miss it](https://plugins.qgis.org/plugins/pyqgis_resource_browser/)!
[Demonstration video of the QGIS plugin PyQGIS Resource Browser](https://user-images.githubusercontent.com/1596222/232868878-1134695b-5dd8-405e-96af-00a2856d4535.webm)
### Related contents
- blog posts/tutorials (in French :fr:):
- [How to use embedded images in PyQGIS?](http://geotribu.fr/articles/2021/2021-01-19_pyqgis_utiliser_icones_integrees/)
- [How to generate a table of embedded images in PyQGIS?](http://geotribu.fr/articles/2021/2021-02-02_pyqgis_previsualiser_images_integrees/)
- resources file in QGIS project:
- Qt documentation:----
## Development
### Requirements
- Python 3.10+
- network connection authorized to github.com
- [Material for Mkdocs Insiders](https://squidfunk.github.io/mkdocs-material/insiders/) (sponsorware) token set as environment variable `GH_TOKEN_MATERIAL_INSIDERS`
- [dependencies for images processing listed on theme documentation](https://squidfunk.github.io/mkdocs-material/setup/dependencies/image-processing/). Typically, on Ubuntu:```sh
sudo apt install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
```### Setup
Typically on Ubuntu:
```sh
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install -U -r requirements.txt
pre-commit install
```### Cheatsheet
Run the script:
```sh
python qrc_preview_in_md.py
```The output markdown page is located at `docs/index.md`, overriding the version pushed as project has been started.
### Website
Copy the `README.MD` into the `docs` folder:
```sh
cp README.md docs/credits.md
```Build:
```sh
mkdocs build
```Serve locally:
```sh
mkdocs serve
```Open your browser on: `http://localhost:8000`
----
## Deployment
The website is monthly regenerated and [deployed on GitHub Pages](https://geotribu.github.io/pyqgis-icons-cheatsheet/) using GitHub Actions. For more details, see the [deploy.yml workflow](https://github.com/geotribu/pyqgis-icons-cheatsheet/blob/51179754fca14ea993d84877714eeeb121cf4fcf/.github/workflows/deploy.yml).