Erickrus / sketch_measure

Sketch measure parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sketch_measure

This library is built to parse the exported index.html file, generated by 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:

└── sketch_measure_demo
    ├── assets
    ├── index.html
    ├── links
    ├── preview
    └── sketch_measure_demo.sketch

Following codes demostrate how to get the information.

from sketch_measure import SketchMeasure

sm = SketchMeasure.load("sketch_measure_demo/index.html")
# then all elements are available as python object

for layer in sm.artboards[0].layers:
    layer.pretty_print()

License

Apache 2.0 license

About

Sketch measure parser

License:Other


Languages

Language:Python 100.0%