Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example #2

Closed
jon49 opened this issue Jan 3, 2013 · 4 comments
Closed

Example #2

jon49 opened this issue Jan 3, 2013 · 4 comments

Comments

@jon49
Copy link

jon49 commented Jan 3, 2013

I was wondering if you could give an example HTML file on how to get this to work. I know enough javascript & HTML to be dangerous. Maybe this project is out of my league. I don't know.

If you could walk me through I could create a how-to video on this and put it on youtube. I use BlueHost for my website with WordPress.

Thanks for your help!

This project is exactly what I have been looking for as I have a journal of letters from my great grandmother and I put it in epub but some people prefer viewing it on a website and refuse to download any additional software to their computers to view it.

Thanks again!

@Vaporbook
Copy link
Owner

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

@jon49
Copy link
Author

jon49 commented Jan 7, 2013

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!

@Vaporbook
Copy link
Owner

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.

@jon49
Copy link
Author

jon49 commented Mar 12, 2013

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
> epub2web@0.1.4 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants