marketch icon indicating copy to clipboard operation
marketch copied to clipboard

Asset file names

Open mitchellknight opened this issue 10 years ago • 3 comments

Is there any way to control the file names of assets/images? For example, Adobe Photoshop has a feature called Generator that allows you to control the names of exported images by naming the layer a certain way. Right now the file names appear to be random.

mitchellknight avatar Dec 09 '15 20:12 mitchellknight

i have try to use html5 download attribute to rename the layer name when export, but it only work on webserver.

tudou527 avatar Dec 10 '15 14:12 tudou527

@tudou527 looks like a bug here. download attr is getting assigned the md5 hash vs layer name: https://github.com/tudou527/marketch/blob/9c1b302a84f8ccff896d4c4e35c9c18e27370473/marketch.sketchplugin/Contents/Sketch/index.html#L743

Looks like you need to add layerData.name to a html attribute of the download button in showPanel() method? If you like, I can set up a PR for this.

ksokhan avatar May 10 '16 00:05 ksokhan

Hey @ksokhan, can you confirm that the downloaded assets use the layer name now? The plugin is still giving me md5 names even after your PR.

collinhundley avatar Nov 01 '16 20:11 collinhundley