processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.37k stars 1.32k forks source link

Download Collections as zip #273

Open catarak opened 7 years ago

catarak commented 7 years ago

Once #43 is implemented, it would be nice to be able to download a collection as a zip. Then, for example, a teacher could easily upload all of the files to Github.

catarak commented 7 years ago
screen shot 2017-07-11 at 2 00 04 pm
slowizzm commented 4 years ago

A download all sketches into a .zip would be nice also.

MohdImran001 commented 3 years ago

Hi @catarak, I'd like to work on it.

catarak commented 3 years ago

@MohdImran001 go ahead!

MohdImran001 commented 3 years ago

Hi @catarak, please review my PR.

niemenjoki commented 3 years ago

A download all sketches into a .zip would be nice also.

Hi @slowizzm,

I have created an unofficial implementation of this feature here.

Anyone in the p5 community can use my code if it helps adding the feature in the web editor.

jht1493 commented 3 years ago

Thanks @jnsjknn p5-project-downloader, close to what I'm looking for. Ideally i'd like to keep local copy of sketches in sync with online version.

mhsh312 commented 10 months ago

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 a Collection, since it has the itemsproperty that is an array of sketches. Iterating through the array, each sketch can be added to a single zip file.

A similar fix can be done for #1939

So, if both these issues are still open, please assign them to me. @lindapaiste @raclim

Noorain464 commented 2 months ago

I would like to work on this issue