Skip to content

Instantly share code, notes, and snippets.

@scripting
Last active April 12, 2020 15:15
Show Gist options
  • Select an option

  • Save scripting/aa50ae77b8929bcad55c8b7125a6f3ba to your computer and use it in GitHub Desktop.

Select an option

Save scripting/aa50ae77b8929bcad55c8b7125a6f3ba to your computer and use it in GitHub Desktop.
Psuedocode for how I'd like zip archivng to work. It gives me full JS to decide if a file belongs or doesn't.
const zip = require ("davezip");
const fs = require ("fs");
const theArchiveFile = zip.createArchive ('outlines.zip");
fs.fileloop ("/users/bullmancuso/publicfiles/", function (err, f) { //I made up fs.fileloop, it would be nice ;-)
if (f.hasExtension (".opml")) {
zip.addToArchive (f, theArchiveFile);
}
});
zip.closeArchive (theArchiveFile);
@scripting

Copy link
Copy Markdown
Author

I've gotten the sample code for the archiver package to work locally. So I'm on the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment