JohnCoatesOSS/SketchKit

.sketch XML Representation

Open

#1 创建于 2016年2月3日

在 GitHub 查看
 (9 评论) (0 反应) (0 负责人)Objective-C (1 fork)github user discovery
help wanted

仓库指标

Star
 (49 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

One of the main reasons for building SketchKit is to make it easier to collaborate on Sketch projects.

Right now if you commit a .sketch file all you get is an opaque binary. What if you change the name of a layer and want to just commit that change? You need to commit another full binary. You're not able to track changes like other projects. I'm working on being able to represent full Sketch documents in XML. The way this will work is that you'll save a Sketch document as .SketchML file (Sketch Markup Language). This will actually be a folder, and inside will be a purely text XML file representing the entire document, as well as an assets folder that contains all raster images.

Any feedback is welcome!

Here's an example of the XML I have so far, representing an oval shape.

<shapeGroup name="Oval 1">
<style>
    <borders>
        <styleBorder thickness="1" position="0">
            <color red="0.592" green="0.592" blue="0.592" alpha="1"/>
        </styleBorder>
    </borders>
</style>
<bezierPath>
    <moveTo x="126" y="199"/>
    <curveTo x="199" y="126" controlPoint1x="166.3167867354" controlPoint1y="199" controlPoint2x="199" controlPoint2y="166.3167867354"/>
    <curveTo x="126" y="53" controlPoint1x="199" controlPoint1y="85.6832132646" controlPoint2x="166.3167867354" controlPoint2y="53"/>
    <curveTo x="53" y="126" controlPoint1x="85.6832132646" controlPoint1y="53" controlPoint2x="53" controlPoint2y="85.6832132646"/>
    <curveTo x="126" y="199" controlPoint1x="53" controlPoint1y="166.3167867354" controlPoint2x="85.6832132646" controlPoint2y="199"/>
    <closePath/>
    <moveTo x="126" y="199"/>
</bezierPath>
</shapeGroup>

贡献者指南