![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2013
Device: iPad 1
|
Bug: --debug-javascript broken on Mac
(deleted, reported as https://bugs.launchpad.net/calibre/+bug/1183014)
Hi, In Calibre 0.9.31 for Mac (10.6.1 but it shouldn't matter), from the Terminal, running either "calibre.app/Contents/MacOS/ebook-viewer --debug-javascript foo.epub" or simply "ebook-viewer --debug-javascript foo.epub" after having clicked the button "Install command line tools" in Calibre's Preferences/Miscrellaneous fails with error "IOError: [Errno 2] No such file or directory: u'/Applications/calibre.app/Contents/Resources/Python/site-packages/calibre/ebooks/oeb/display/utils.coffee'". Directory "/Applications/calibre.app/Contents/Resources/Python/site-packages/calibre/ebooks/oeb/display" exists, but contains only __init__.pyo, test-cfi/run.pyo and webview.pyo. I've downloaded the current source code with "bzr branch lp:calibre" and copied the files from src/calibre/ebooks/oeb/display to Python/site-packages/calibre/ebooks/oeb/display. No more error, and console.debug in epub's JavaScript is shown in the Terminal. Thanks, Yves Last edited by Yves000; 05-22-2013 at 01:54 PM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,308
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
IIRC --debug-javascript only works if you are running from source. See the setting up a development environment section of the user manual. I should probably add that to the help text for that option.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,308
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
On second thoughts, I decided to just fix it so it doesn't try to compile the coffeescript when running from a binary build. http://bazaar.launchpad.net/~kovid/c...revision/15067
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2013
Device: iPad 1
|
Thanks for your fast reply! I don't think the dev environment section mentions debugging epub files themselves; it looks more like the first step for Calibre development. Anyway, a remark in what's displayed by "ebook-viewer --help" would be very useful.
Edit: this is a reply to what you posted at 05:48 ![]() |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,308
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--debug-javascript isn't intended for debugging epub files, its for debugging the javascript code used in the viewer itself. Of course, you could use it to debug javascript in an epub file as well
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2013
Device: iPad 1
|
Ok, I understand. I'm still a beginner in the field, so I'm trying to find the best tools to understand epub files. For debugging JavaScript in epub (I mean what's specific to ebooks and differs from plain HTML5, such as coordinates), I haven't found anything better than ebook-viewer.
Thanks, Yves |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TidBITS mac news recipe broken? | daletsteele | Recipes | 0 | 01-05-2013 04:11 PM |
Broken Mac versions starting from 0.8.63? | gregbg | Devices | 5 | 08-10-2012 01:42 PM |
Calibre 0.8.42 bug on Mac | fantasyfan | Devices | 0 | 03-14-2012 06:02 AM |
Embedded font bug or CSS bug in ADE | JSWolf | ePub | 10 | 06-11-2011 02:34 PM |
Bug in calibre 0.7.5 on Mac related to iTunes | lmamakos | Calibre | 5 | 06-26-2010 09:07 PM |