Skip to content

.sketch XML Representation #1

@JohnCoates

Description

@JohnCoates

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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions