dgorissen / coursera-dl

A script for downloading course material (video's, pdfs, quizzes, etc) from coursera.org
http://dirkgorissen.com/2012/09/07/coursera-dl-a-coursera-download-script/
GNU General Public License v3.0
1.73k stars 299 forks source link

Option to compress course after downloading? #70

Closed jackmaney closed 10 years ago

jackmaney commented 10 years ago

It would be nice to have, say --gz name_of_tarball.tar.gz and perhaps --zip name_of_zip.zip flags to compress the entire course folder after the download is complete, so that the courses can be compressed for relatively easy long term storage.

My Python-fu isn't strong, but I can try to tack this feature on.

dgorissen commented 10 years ago

Happy to accept the patch :) Should be easy to do with the zipfile library. I would make the filename optional, defaulting to the class name + .zip or similar.

jackmaney commented 10 years ago

After getting a bit of sleep, I realized that not a whole lot of space would be saved by tarballing the course directories, since MP4 files are already compressed. However, it would still be handy for storing courses in a single file instead of a tree of directories.

I'll add the feature this weekend.

jackmaney commented 10 years ago

I had some stuff come up this weekend, but I'm testing a patch now (given the size of the courses, the speed of iteration is slower than I'd like).