contentsync / SketchContentSync

Sync sketch files with google docs.
275 stars 17 forks source link

Use ContentSync from Sketch scripting to sync a Selection #129

Open nilsdoehring opened 3 years ago

nilsdoehring commented 3 years ago

Request for a programmatic way to use ContentSync on a Sketch Selection object.

Example use case based on #126 :

function withContentSyncVersion(version) {
  if(version.syncable) {
    //omitted: duplicate a page in Sketch, name it by the value of version.name, and select all objects on that page
    ContentSync.API().syncSelection(version.name, selection); //or similar
  }
}

ContentSync.API().versions((ok, data) => {
  if(ok) data.map(withContentSyncVersion);
  if(!ok) console.log("Error: " + data);
});
nilsdoehring commented 3 years ago

Hi @dbrody – any chance to get this implemented? It would be a massive time-saver for our workflows.

dbrody commented 3 years ago

@nilsdoehring yes we've been giving it some thought. There are some implications we need to factor in to prevent issues if this were to be misused accidentally. Also, our system currently only pulls one version at a time so we need to consider a few other changes as well to make this sort of use not take too long and not create too much additional overhead.

This is on our list and we will try to get it into our prioritization stack in the coming weeks. I'll update this as we have updates.

dbrody commented 1 year ago

@nilsdoehring Sorry this has been backlogged so long. We didnt see many 👍 on it so it has not been prioritized. If you still want it implemented, please 👍 on the issue description.