skip to Main Content

How can I parse .sketch files generated by sketch – mac application?

I know that psd_tools can be used to parse .psd files generated in Adobe Photoshop.

3

Answers


  1. Especially as I am unfamiliar with Sketch I do not know of any equivalents to psd_tools. However, this question might help you. Otherwise, you might need to create your own parser.

    Login or Signup to reply.
  2. I don’t have any experience with Sketch, but I downloaded a sample .sketch file and it turned out to be an “SQLite 3.x database”. This means you can open it with python’s sqlite3 module.

    As it happens I had some code lying around that I wrote to inspect another sqlite database, so I took a look: It contains a metadata table and a “payload” table (called metadata and payload, respectively), both of which have just name and value columns. However, the payload table has just one row, and in both tables the values seem to be containers in some other format I don’t recognize. So although sqlite3 is the file format, it appears that it is just the outer layer of the onion.

    Login or Signup to reply.
  3. Edit:
    The new sketch file format (> 43) is super friendly.
    It’s actually a zip folder in which you have the assets and json files which describe the contents.
    http://sketchplugins.com/d/87-new-file-format-in-sketch-43

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search