![]() |
#3586 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
Code:
var myCode, codePath, f, value1, value2; codePath = "/Data/.../scripts/"; //load js-code myCode = Core.io.getFileContent(codePath); //create new Function form myCode passing two paramters "param1/param2" used in external code f = new Function("param1,param2", myCode); // set parameters if needed value1 = something; value2 = anotherting; // execute the function try { f(value1,value2); }catch (ignore) {} http://de.selfhtml.org/javascript/sp...funktionen.htm HTH Mark Last edited by Mark Nord; 03-31-2012 at 03:29 PM. Reason: added quote of question due to new page |
|
![]() |
![]() |
![]() |
#3587 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Mar 2012
Device: Prs-650
|
Hello all.
It's for the battery drain thing (again). So I thought that the bug went after those 2-3 resets. In fact it was still there. I deleted all the books on the reader, I reseted it multiple times. After all that I simply used the normal firmware. In the end I used the last nightly build compiled by Analogus. Still buggy. Whatever the book, in standby it eats battery. Before going to bed, battery is full. In the morning only one bar left. With the Lechuck Version everything went smoothly, so I reverted the only new option I ticked. The time necessary to shut the reader. Default it was 5 minutes, I put something like 10 or 15 minutes. Since it's set on default again, no more problems, my reader works as intended. No battery drain in the night. Is there a correlation or is it pure luck...don't know. Since my reader is working again...I don't want to change any options ![]() So if someone has any battery drain, it's maybe because you changed the time to shutdown option. And just an idea by the way. We all use Calibre and we can change the cover from epub with 2 clicks. On the official firmware, this cover will be used as main cover. On the PSR+ firmware only the "epub" cover is used. Sometimes there is no cover or a low-res/bad one...changing it within the epub need some tools like Sigil and way much time than the calibre "change the cover" metadata way. If we could choose wich cover to use ; the build-in cover within the epub or the calibre metadata epub cover...it would be really really great ![]() Since there is this (awesome) feature of using the cover on the current reading book on shutdown...it would be great to implement this little tweak. Thanks again for all the hard work Kek |
![]() |
![]() |
![]() |
#3588 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
One question:
Is it possible to make an OPTION(group) callable from within a book (say with a button)? Reason for asking: I have allready made an optiongroup in PRS+-options which makes it possible to alter style.css in a flexible way. It lets you choose/combine you own font-size, text-indent, line-space, text-align, ... This functions more or less well. Ebook will reload automatically. Now it would be nice not to close the book for altering this options and therefor calling this options from within a book similiar CSS-styles in PRS+. In other words: Is it possible to make a action which calls this option(group)? Thank you very much A. |
![]() |
![]() |
![]() |
#3589 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
Once it has copied all your desired Calibre covers to the Sony you will need to decide whether you want to use the PRS+ Standby Image Type option Current Book Cover or System Standby Function, for each particular book. Switch between them as necessary. Another Calibre plugin you may find useful is the 'Modify epub' plugin, which has an option to update the existing epub built-in cover. It won't work with all epubs (e.g. DRM'd ones) because it will depend on how the epub specifies its cover. It should work fine on any epub originally created by Calibre. Of course you will then need to resend the updated epub to the Sony. Last edited by jackie_w; 04-02-2012 at 10:34 AM. Reason: another option |
|
![]() |
![]() |
![]() |
#3590 | |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
Quote:
Actually, what you say is incorrect. Our code uses the built-in Sony procedure for retrieving the cover from the epub file. The difference is we then use it at 800x600 size, whereas Sony only used it to generate a small thumbnail. But the same source file is being used in both cases. What you are noticing is that sometimes an epub has a cover image (according to the metadata) and then the first page of the book is a higher quality version of the cover. It would be too difficult to write a procedure to find an then use such a higher quality image. Instead, just make sure that when you use Calibre to change the cover, choose a high quality image! I never use the one that Calibre suggests. I do my own Google image search and find the highest quality image I can. Sincerely, Ben. |
|
![]() |
![]() |
![]() |
#3591 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
funny that we are doing this all here in English, whereas it would be so much easier doing it in our mouther-tongue. But to answer your question: It is already done in "EpubUserStyle.js" which provides the CSS selection upon a keypress. See if you can rework your code like this, or integrate it into this addon, as it very much suits the same case. |
|
![]() |
![]() |
![]() |
#3592 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Hi all
Another question - maybe someone could help (as most of the time): What I want to do: I add new buttons on the FONTSIZE OVERLAY (sizeOverlay.xml). Over this buttons I try to activate one of my own FUNCTIONS. What I allready have: New buttons on the FONTSIZE OVERLAY What I don't know: How to call FUNCTIONS which are stored in one of my own *.js-files. Any information would be very helpfull Thank you A. |
![]() |
![]() |
![]() |
#3593 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
I havn't changed the value on my 650, but set the 505 to go to sleep after 10 minutes, and there are no side-effects so far. |
|
![]() |
![]() |
![]() |
#3594 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Hi Mark
Yes that's right: "Jo, Sepp"... But that's of course not my real name. Concerning mother-tongue I regard writing in English as an exercise not becoming too rusty ;-) EpubUserStyle: I recoginzed that but was not able to make some usefull things with that code. Still a very beginner in coding. Besides: I learn bits of HTML, XML, CSS, LINUX and JS just to improve my reader. Its great 'fun'. Question in the post above aims in same direction - I try to call my functions over buttons. Any (simple) idea? Thanks |
![]() |
![]() |
![]() |
#3595 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Analogus,
same here "fun" and though more then 20 years in programming/reverse-engineering only some two years with kinoma-FSK and JavaScript. Look on quisvir's code applied to main.xml. There are some new buttons with actions like : "doAddToCollection" The "trick" is to set your code into the right "context", which for above mentiond example is: "model.container.sandbox.OPTION_OVERLAY_PAGE.sandb ox.doAddToCollection" (See BookManagement_x50.js) To find the context folllow the xml-structure of your "host". All xml-created/triggered code is executed in "sandbox"es separating it form the inner/elevated FSK or also PRS+core/addon code. |
![]() |
![]() |
![]() |
#3596 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Thank you. More accidentally than with knowledge I managed it.
Now it is possible to use fine-grained font size changing over CSS with the SIZE-OVERLAY: Group for changing CSS-file: A. |
![]() |
![]() |
![]() |
#3597 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
|
![]() |
![]() |
![]() |
#3598 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
|
Quote:
thanks |
|
![]() |
![]() |
![]() |
#3599 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#3600 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
jackie_w:
That should be answered by the developers of PRS+. I'm just playing with the code for myself ;-) VICTORSJG: I will when it's ready. Problem now are the buttons: The button pressed don't remain black. So far as I can see, there is a hardcoded(?) variable responsible for that (VAR_RADIO_CSS_FONT_SIZE) which I am not able to use. Code is very rough and shoud be cleaned up. JSWolf: Of course there will be a compiled version ("Zork-Edition"). But it takes a couple of days to finish the job. I'll post it here when ready. Source-Code will be uploaded then too. Things to be done: I'll integrate line-height-buttons in the overlay too to have the possibility to change it on the fly. Looking good so far. Problem generally is, that all this formattings have to be done over CSS. And problem with CSS (additional to my limited knowledge) is that lots of books have very different CSS-tags. Buttons need other icons (much work). A. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using HD Folders as Collections on Sony PRS-505 | fglaysher | Calibre | 8 | 07-26-2010 09:55 PM |
Enhanced Firmware for V3 | keng2000 | HanLin eBook | 12 | 04-12-2010 09:30 AM |
Poll: Sony Reader PRS-505 upgrade to Sony PRS-700 | Kris777 | Sony Reader | 70 | 02-18-2009 06:34 PM |
Sony Reader PRS-505 upgrade to Sony PRS-700 | Kris777 | Sony Reader | 23 | 12-08-2008 06:56 AM |
Sub folders in firmware v1.08 | Prince Hal | Amazon Kindle | 28 | 10-23-2008 03:20 PM |