https://github.com/erickrus/sketch_measure
Sketch measure parser
https://github.com/erickrus/sketch_measure
parser python sketch sketch-measure
Last synced: about 2 months ago
JSON representation
Sketch measure parser
- Host: GitHub
- URL: https://github.com/erickrus/sketch_measure
- Owner: Erickrus
- License: other
- Created: 2021-09-20T12:45:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-20T13:25:00.000Z (over 3 years ago)
- Last Synced: 2025-01-11T22:29:12.584Z (4 months ago)
- Topics: parser, python, sketch, sketch-measure
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sketch_measure
This library is built to parse the exported index.html file, generated by [Sketch Measure](https://github.com/utom/sketch-measure) plugin. It helps the programmer to quickly get the information from its embedded json data. So, the automation from the index.html file is made possible with this library for further processing.# Usage
Assume exported index.html is here:
```shell
└── sketch_measure_demo
├── assets
├── index.html
├── links
├── preview
└── sketch_measure_demo.sketch
```
Following codes demostrate how to get the information.```python3
from sketch_measure import SketchMeasuresm = SketchMeasure.load("sketch_measure_demo/index.html")
# then all elements are available as python objectfor layer in sm.artboards[0].layers:
layer.pretty_print()
```# License
Apache 2.0 license