Code Monkey home page Code Monkey logo

Comments (7)

grawlinson avatar grawlinson commented on July 20, 2024 1

It's easier to do zipping in pure JS, rather than depending on the underlying OS to have a zipping utility. Child processes are a bit of a pain too. I've got a proof-of-concept epub generator based on this repo and it's not yet public, but is licensed under MIT so do whatever you want with it. ;)

Here's what I have to generate an epub 3.0 file using archiver and fs-extra ... and bluebird for promises functionality as I prefer that over q. Should be fairly straightforward to change the bluebird refs to q.

EDIT: Linked to repo instead of copy/pasting here.

from epub-gen.

cyrilis avatar cyrilis commented on July 20, 2024

Hi, @dsg34
You might working on Windows platform, zip is a build in command on Linux and OS X, but it's not supported on windows. So you might need to run this on a *nix platform, Or may you make a PR to make it applicable for windows ? Any advice, suggestion or PR will be appreciated. 😄

from epub-gen.

pedrosanta avatar pedrosanta commented on July 20, 2024

Yep, on Windows isn't very straightforward to have zip as a command line tool.

Perhaps we could think of migrating/using a JS implemented Zip library, like https://github.com/Stuk/jszip or https://github.com/cthackers/adm-zip.

Will look into that if I got time in the coming weeks.

Good shout @dsg34! 👍

from epub-gen.

pedrosanta avatar pedrosanta commented on July 20, 2024

Yap, that's nice, helpful @grawlinson. Generating zip with JS is definitely better, more portable than using the command. I'll throw a PR with that update as soon as I got a bit of time.

Cheers.

from epub-gen.

jpittner avatar jpittner commented on July 20, 2024

I've updated this to not require zip and to instead use archiver (and rimraf to nuke the tmp dir). Will test on windows then figure out this pull request stuff. oh, I should have read grawlinson's thing before doing this myself. :) My changes aren't as drastic, and the coffee script is there as well, should be easier to include!

from epub-gen.

pedrosanta avatar pedrosanta commented on July 20, 2024

Thanks @grawlinson @jpittner. I've just made a few tiny change proposals on #26, waiting on them, then I'll merge and release a new version with this. Great job. 👍

from epub-gen.

pedrosanta avatar pedrosanta commented on July 20, 2024

v0.0.16 fixes this, closing.

from epub-gen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.