Export: All artboards as PNG
iamhenry opened this issue · 28 comments
This use to create folders for each Page that the document had. It's not working for me anymore. I'm able to export the artboard from the current Page but doesn't create the folders like it use to.
Sorry but now it doesn't even export anything at all. I've updated all of the files with the newest versions.
Could you please take a look at the output in Console.app and paste it here?
Thanks in advance : )
Not really sure I know how to use it properly. I recreated the steps with Console.app opened but I'm not sure where the results are being displayed. Help?
Are you saving to a local folder? I got prompted with iCloud when I just
tried to use it. You should be able to click on "All Messages" and see the
Sketch output. Here's a picture of my Console.app log with messages from
Sketch.
-Mike
h4labs.com http://bit.ly/18CQIix (@h4labs, @melling)
iOS Apps: Chinese http://bit.ly/1hMHy8s | French http://bit.ly/1gpeh3j |
German http://bit.ly/1dpZctq | Italian http://bit.ly/1fk1hsS |
Russianhttp://bit.ly/IFrQ0i|
Spanish http://bit.ly/1jNRRIV
http://appstore.com/h4labs http://bit.ly/19C1xys
Facebook: https://www.facebook.com/h4labs http://on.fb.me/1cDtwim
On Thu, Jan 30, 2014 at 6:12 PM, Henry Moran notifications@github.comwrote:
Not really sure I know how to use it properly. I recreated the steps with
Console.app opened but I'm not sure where the results are being displayed.
Help?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-33745403
.
Literally nothing happens when I click the export "all artboards as png's". No modal or prompt to select a saving location.
It seems to work silently once you tell it where to export the files, even
if you create a new document. Check your Console log to see where it's
writing the files. Mine are here: /Users/melling/Dropbox/Documents/Sketch
1/30/14 8:43:17.423 PM Sketch[51488]:
AppSandboxFileAccessPersist.keyForBookmarkDataForURL(file://localhost/Users/melling/Dropbox/Documents/Sketch/t2_export/)
1/30/14 8:43:17.425 PM Sketch[51488]: >
bd_file://localhost/Users/melling/Dropbox/Documents/Sketch/t2_export/
1/30/14 8:43:17.427 PM Sketch[51488]:
AppSandboxFileAccessPersist.keyForBookmarkDataForURL(file://localhost/Users/melling/Dropbox/Documents/Sketch/)
1/30/14 8:43:17.428 PM Sketch[51488]: > bd_file://localhost/
Users/melling/Dropbox/Documents/Sketch/
1/30/14 8:43:17.429 PM Sketch[51488]: Bookmark data found
-Mike
h4labs.com http://bit.ly/18CQIix (@h4labs, @melling)
iOS Apps: Chinese http://bit.ly/1hMHy8s | French http://bit.ly/1gpeh3j |
German http://bit.ly/1dpZctq | Italian http://bit.ly/1fk1hsS |
Russianhttp://bit.ly/IFrQ0i|
Spanish http://bit.ly/1jNRRIV
http://appstore.com/h4labs http://bit.ly/19C1xys
Facebook: https://www.facebook.com/h4labs http://on.fb.me/1cDtwim
On Thu, Jan 30, 2014 at 8:35 PM, Henry Moran notifications@github.comwrote:
Literally nothing happens when I click the export "all artboards as
png's". No modal or prompt to select a saving location.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-33754630
.
Right, but before I can do that I need to set a dir for it to save at. That's the part that I'm not able to get. For some reason the console isn't showing me any data either which is really strange.
I'm assuming that you've tried restarting the app. I have the latest
Sketch from the app store: 2.4.2 (5302)
I noticed these instructions in the library dir.
https://github.com/bomberstudios/sketch-commands/blob/master/library/README-01.png
https://github.com/bomberstudios/sketch-commands/blob/master/library/README-02.png
These seem to apply to an older version.
I looked at the source. There's a keyboard short-cut. Try it to see if
your Plugin menu flashes. Also, you can add log() statements to test the
flow. I think you have to restart Sketch if you add code.
mb2:Export melling$ more All\ Slices\ as\ PNG.sketchplugin
// Export all slices (ctrl alt shift x)
#import 'library/common.js'
log("Boom #0");
if ([doc fileURL] == null) {
alert("You need to save your document to use this command");
} else {
log("Boom #1");
com.bomberstudios.export_all_slices("png");
}
-Mike
h4labs.com http://bit.ly/18CQIix (@h4labs, @melling)
iOS Apps: Chinese http://bit.ly/1hMHy8s | French http://bit.ly/1gpeh3j |
German http://bit.ly/1dpZctq | Italian http://bit.ly/1fk1hsS |
Russianhttp://bit.ly/IFrQ0i|
Spanish http://bit.ly/1jNRRIV
http://appstore.com/h4labs http://bit.ly/19C1xys
Facebook: https://www.facebook.com/h4labs http://on.fb.me/1cDtwim
On Thu, Jan 30, 2014 at 8:50 PM, Henry Moran notifications@github.comwrote:
Right, but before I can do that I need to set a dir for it to save at.
That's the part that I'm not able to get. For some reason the console isn't
showing me any data either which is really strange.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-33755312
.
I'm actually using the latest beta version.
EDIT: just tried the latest version from the app store and the plugin still doesn't work.
Good morning.
Let's try to clarify the issues at play here : )
@iamhenry: you say "I need to set a dir for it to save at". That is not 100% correct. Right now, the script tries to export files to your_document_path/your_document_name_export/page_name/artboard_name.png automatically. If you are using the sandboxed version, you'll get an authorization prompt, asking you for permission to write to that folder. If you are using the (non-sandboxed) beta, you'll never see the authorization prompt.
To make matters a bit more confusing, you'll only see the authorization prompt once for every folder, as it is cached by the script and reused on subsequent exports.
Now, I need you to confirm this information to me, please:
- exact Sketch version number
- whether it's the App Store version or not
- OSX version number
- whether your document is saved
- are you using iCloud?
- if not, what's the document's save location, including the full path (i.e: /Users/henry/Documents/...)
- how are you running the command? Are you choosing it from the Plugins menu with your mouse / trackpad, or are you using a keyboard shortcut?
I think that's all. Once I have that information I will be able to either provide a solution, or create a custom export script with logging everywhere to better pinpoint the problem.
Thanks in advance! : )
Right, I understand that it saves it automatically since I'm using the beta version. I've used the plugin successfully before. It's just not working for me at the moment.
- version #2.4.2 (5310)
- Beta version
- OSX 10.9.1
- Document is saved
- no iCloud is being used. Dropbox is.
- dir: /Users/henrymoran/Dropbox (Fullscreen)/Fullscreen Product/Creator Platform/Community/
- I've used the command from the menu dropdown and creating a keyboard shortcut from System Settings.
Bump.
This a reminder for myself to create a "log everything" version of the command for @iamhenry : )
Thanks again! Sorry for being such a pain but this is the commands I use the most.
Downloaded the latest commands. Was that suppose to fix it? I'm still having the same issues without being able to see anything in the console. :(
Bump? Still not working for me on latest MAS/Beta. This is my favorite command. :)
This seems to be the info that Console.app gives me:
3/3/14 2:53:09.378 PM Console[21576]: setPresentationOptions called with NSApplicationPresentationFullScreen when there is no visible fullscreen window; this call will be ignored.
I'm having a similar issues and i discovered it is creating a folder called filename_export
with the exported PNGs INSIDE the .sketch file bundle.
WHAT?
I need to take a look at that document, pronto! Can you share it?
Also: what's the path it's saved to?
I can share it, I'll email it to you with the relevant info.
@iansoper thanks, not sure if my email address is visible on my profile: bomberstudios AT gmail
I just sent you an email.
Oh, I just received it while writing the comment. LET'S INVESTIGATE! :D
This doesn't seem to be working for me at the moment. I would love it if you can help me to get this working please. Thanks!
Not working for me either....
So the issue is that it's sandboxed and I already tried to add read/write access to those folder
11/14/14 4:12:17.000 PM kernel[0]: Sandbox: Sketch(4751) deny file-write-create /Users/Henry/Dropbox (Fullscreen)/Fullscreen Product/HAMPTON/Design/Henry/_android/_source/android-hampton_export
Is there any way around this?
I just pushed a fix that seems to work in Yosemite with 3.1.1 and 3.2 beta.
Please let me know if this solves the issue for you : )
Thanks for the update but I'm still having sandbox issues.
11/15/14 11:13:21.000 AM kernel[0]: Sandbox: Sketch Beta(6496) deny file-write-create /Users/Henry/Desktop/android-hampton_export
I've tried the MAS and the 3.2 beta 4 version and still no luck. Could it be some setting I need to tweak on a system level?