GithubHelp home page GithubHelp logo

Example about epub-tmpl HOT 4 CLOSED

vaporbook avatar vaporbook commented on July 29, 2024
Example

from epub-tmpl.

Comments (4)

Vaporbook avatar Vaporbook commented on July 29, 2024

Hi Jon,

Thanks for your interest. The example you're looking for is in the epub2web module here:

https://github.com/Vaporbook/epub2web

It uses this module and several others in combination to achieve what you want. You will need some node.js skills to run the example, but it displays an epub from Feedbooks in the browser.

Here's an intro to node:
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&ved=0CEoQtwIwAw&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Djo_B4LTHi3I&ei=VbTlUNybCIrM0wH4_IDoDQ&usg=AFQjCNFXUM9W91ks8PpqeKBcbH0TBXYwBA&bvm=bv.1355534169,d.dmQ

I'm very interested in making this easier to work with, so looking forward to your feedback.

Best,
Aaron

from epub-tmpl.

jon49 avatar jon49 commented on July 29, 2024

Thanks Aaron,

I viewed the introduction to node and installed it on my computer. I installed epub2web with node.

I guess where I am now confused is how am I actually supposed to view the epub page on a web page.

I tried running test.js (and the others) by putting test.js into the console. It gives me the following error:

Windows Script Host
Script: C:\Documents and Settings....\test.js
Line: 4
Char: 1
Error: Object expected
Code: 800A138F
Source: Microsoft JScript runtime error

Not sure what I should be doing. Sorry for all these basic questions. But once I work through it I'll post a YouTube video how to on it. Thanks for your help!

from epub-tmpl.

Vaporbook avatar Vaporbook commented on July 29, 2024

Sorry for the belated response. You can run the test server by typing 'npm test' from the project directory. You will need both node.js and npm (node package manager) installed. Once it's running the test server, you'll see instructions on the console that direct you to see the test epub in the browser.

I'm making some updates soon that will make it easier to work with the html templates.

from epub-tmpl.

jon49 avatar jon49 commented on July 29, 2024

Sorry, was learning Linux (on old computer). Now I have time for this project again.

So I did what you told me. I installed node.js (which comes with npm) on both Windows 8 and Lubuntu and then installed epub2web via npm/node.js (command line). Both come up with this error when I try to run 'npm test':

jon@main-jon:~/Documents/Programming/node_modules/epub2web$ npm test
> [email protected] test /home/jon/Documents/Programming/node_modules/epub2web
> node test/test.js
initializing cache with config:
{ cacheDir: '/home/jon/Documents/Programming/node_modules/epub2web/test/../www/cache',
  idLimit: 100 }
cacheDir set by epub-cache module to /home/jon/Documents/Programming/node_modules/epub2web/test/../www/cache
reading cache db...
epubdb non-existant or not found, creating
fs.js:338
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/home/jon/Documents/Programming/node_modules/epub2web/test/../www/cache/epubcache.json'
    at Object.fs.openSync (fs.js:338:18)
    at Object.fs.writeFileSync (fs.js:756:15)
    at Object.init (/home/jon/Documents/Programming/node_modules/epub2web/node_modules/epub-cache/lib/epub-cache.js:70:6)
    at Object.attach (/home/jon/Documents/Programming/node_modules/epub2web/lib/epub2web.js:19:9)
    at Object. (/home/jon/Documents/Programming/node_modules/epub2web/test/test.js:22:10)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

from epub-tmpl.

Related Issues (2)

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.