https://github.com/zostera/python-makiwich
python port of mapbox/makiwich
https://github.com/zostera/python-makiwich
Last synced: 12 months ago
JSON representation
python port of mapbox/makiwich
- Host: GitHub
- URL: https://github.com/zostera/python-makiwich
- Owner: zostera
- License: isc
- Created: 2018-09-21T12:05:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T14:02:38.000Z (over 7 years ago)
- Last Synced: 2025-03-02T04:09:32.658Z (12 months ago)
- Language: Python
- Size: 30.3 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# python-makiwich
- python port of https://github.com/mapbox/makiwich
- Uses CC0 [Maki icons](https://github.com/mapbox/maki/)
- Dependencies: [xmltodict](https://pypi.org/project/xmltodict/), for PNG export: [cairosvg](https://pypi.org/project/CairoSVG/)
- Contains Django view to serve icons in `maki.contrib.django.maki_icon`
The icons are not included in this repository, so building the package requires downloading the [Maki icons](https://www.mapbox.com/maki-icons/):
```
curl -L https://github.com/mapbox/maki/archive/master.zip -o maki-master.zip
unzip -qj maki-master.zip 'maki-master/icons/*' -d maki/img/icons/
```
# usage
```python
>>> from maki import MakiMarker
>>> marker = MakiMarker(symbol="park", tint="#3388ff")
>>> marker.svg()
'\nCreated with Sketch.'
```
# Known issues / TODO
- Letters / numbers not supported yet.
- Decide how to keep the icon files (currently not in the repo.)
- Error messages for missing icons need improvement
- check/extend/test `Color.most_readable` implementation