p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Feature-request: download all sketches as zip

Open dhowe opened this issue 3 years ago • 2 comments

Apologies if this already exists, but would be very useful to be able to bulk download all sketches from the 'My Sketches' page

dhowe avatar Oct 08 '21 08:10 dhowe

Thanks for the suggestion! I thought there was an open issue about this but apparently there is not. A related issue is #273.

catarak avatar Oct 08 '21 19:10 catarak

I'd like to take a crack at this if no one else is working on it.

dwight9339 avatar Jan 29 '22 15:01 dwight9339

I'd like to work on this if no one is currently working on it.

Suhasshenoy avatar Oct 14 '23 06:10 Suhasshenoy

So currently the editor uses JSZip to make a zip file of a sketch using this controller:

https://github.com/processing/p5.js-web-editor/blob/f21b84772c85927f8016d7c23aef7ad1a5a41b64/server/controllers/project.controller.js#L289-L294

The same library can be used for all the current sketches of a user. We can use the getProjects controller that returns an array of all projects of a user, and then iterate through this array to add all the projects in a single zip file.

Similar fix can be done for #273

Please assign either or both of these issues to me. @lindapaiste @raclim

mhsh312 avatar Dec 03 '23 08:12 mhsh312

@mhsh312 We may run into issues here due to the size of the zip. See #643. But let's start with what you are proposing and see how that goes.

lindapaiste avatar Dec 05 '23 03:12 lindapaiste

@mhsh312 We may run into issues here due to the size of the zip. See #643.

Since #643 would be an issue for both individual and multiple sketches, I believe it should be addressed separately.

mhsh312 avatar Dec 08 '23 03:12 mhsh312