12-07-2013, 09:34 AM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Dec 2013
Device: Cybook Odyssey
|
epubReadingSystem object
Hello
! The epubReadingSystem object provides an interface through which a Scripted Content Document can query information about a User's Reading System. It’s part of the ePub 3 standard: http://www.idpf.org/epub/30/spec/epu...bReadingSystem An example implementation by Readium-js: https://github.com/readium/readium-j...ding_system.js As far as I can tell from grepping the source code, the Calibre Viewer does not support the epubReadingSystem object? I attached a small ePub [1] that works for me in Readium, but not in Calibre [2]. Would you be interested in adding this feature to Calibre? I could see how far I can get with doing this, though I’ll need a little help. This is what I imagine needs to happen: 1) Add a script to oeb’s existing array of Coffeescripts: https://github.com/kovidgoyal/calibr...ks/oeb/display 2) Add the script to the loaders index: https://github.com/kovidgoyal/calibr.../javascript.py 3 ) Specify that the script needs to be loaded? And only for EPUB3? I was also wondering, how can I start the Calibre viewer with a JavaScript console. Curious what y’all think of this, Best, Eric [1] http://silo.schr.fr/self-conscious-epub.epub (84k) Last edited by DoctorOhh; 12-07-2013 at 06:23 PM. Reason: Attached image |
12-07-2013, 10:30 AM | #2 |
creator of calibre
Posts: 44,001
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You are welcome to add that object if you wish, your procedure for adding it is correct, simply send me a pull request. If you want access to a javascript console in the viewer simply right click on some text and choose Inspect Element, which will open the webkit inspector, that includes a js console.
In order to compile the coffescript into javascript, run python setup.py coffee |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
'builtin_function_or_method' object has no attribute 'rpartition' | RobFreundlich | Recipes | 2 | 06-09-2013 09:56 AM |
The Object of Interest and Associated User | Fat Abe | Lounge | 1 | 02-17-2013 07:46 PM |
Singular or Plural object when you have both? | VydorScope | Writers' Corner | 10 | 09-01-2012 04:26 PM |
'NoneType' object has no attribute 'tag'? | gweminence | Calibre | 7 | 09-13-2011 10:03 AM |
Article object in preprocess_html | stuartweinstein | Recipes | 1 | 11-18-2010 11:53 AM |