Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-30-2012, 04:02 PM   #166
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Thanks for all the feedback! I'll try to reply to most of it in this answer.

@diba, IcyVeins: correct, of course. Hopefully, you didn't only realize it at the last line of text . Karma to both of you, if only for the reason that all hope is not lost yet, as long as people still appreciate literature, and as long as not everybody has fallen victim to the private TV stations' mission to totally dumb down the people.

Quote:
Originally Posted by alaiksander View Post
I think you should mention this on the hack's post.
Well, it's already documented (albeit with slightly different wording) directly inside the configuration file, right before the relevant setting, and it's even prefixed with "IMPORTANT". How much more can I do?

Quote:
Originally Posted by alaiksander View Post
Hmm..will there be support for arabic with your hack? currently it displays arabic but doesnt support RTL (on mobi/azw).
There won't be support for arabic with mobi/azw, because this file format inherently does not support RTL languages. It should work out of the box with KF8 (.azw3) files though, at least from what I read so far. Just look around on the forum, you should find something useful.


Quote:
Originally Posted by morantis View Post
I hope you don't get into one of those chess matches with Kindle where they alter the next update to stop your script, so you re-write the scripts and back and forth. We had written a bunch of libraries for Android and I do believe we finally got them to give up on ICS.
I hope so too, but you never know. It's one thing if a class changes from one release to the next, because it has been improved. This can easily be "fixed" by adapting the patch to it. It's a completely different thing if Amazon starts to aggressively obfuscate their classes (as they did from 5.0.* to 5.1.0) because of some irrational fear. We are not bad crackers. We don't steal code and make millions by selling it. We are wearing white hats, and we are doing all of this because we want to make the device more useful. Why don't the people at Amazon understand that we are dedicating our time to actually add value to their product? Instead, they seem to see us as some kind of evil adversary, and spend their time and money to throw wrenches in our path. This ends up being counterproductive for everyone: both sides have to spend more effort, and instead of actually getting a better product, it just ends up deteriorating (or, in the best case, stagnating). Is that really what you want, Amazon?(*) That said, let's see what the next firmware update will bring.

@eureka: I'm using Eclipse for a good reason (well, at least, a good reason for me): it makes life much easier while developing. I'm aware that the compiling step could be extracted into a javac task in the ant file, but it's just not worth the hassle for me. Anybody who is in for serious patch development needs a correctly set up IDE, which includes both the Amazon jars, as well as jbpatch and serp, anyway.

Quote:
Originally Posted by Zema View Post
ixtab, I'm very happy with your margin patch, I've been waiting for this solution for ages. The only thing that I'd like to improve is possibility to change top/bottom margins for PDF reader only without changing anything in MOBI reader. Is it possible? The point is that PDF documents usually already have margins, but MOBI files are rendered on the fly and margins are necessary. Finally, changing of margins from menu (launcher) separately for PDF and MOBI readers would be incredibly excellent.
I agree with the separate settings for PDF and mobi, and I actually already thought about how this could be done. Unfortunately, they both access the same properties, but with slightly different semantics (meaning: the current default Kindle behavior can actually be considered a bug, and I have to find a workaround to fix it). I'll look into this in the next two weeks, but not right now. In other words: thanks for the comment, the issue is now on my agenda. Just don't hold your breath


@pirl8: Thanks for the hint. Unfortunately, this method requires changes to the underlying book ("compile-time", so to say, whereas my method should be applied at "runtime"), and, if I understand it correctly, it only applies to KF8 books. Nevertheless, I think it is a good idea. Actually, I don't have any KF8 book around, so I don't even know if my method would affect it at all. (Maybe someone has a link to a free KF8 book?). In the end, we might also end up with a combination of both methods.

Finally, @all: Thanks for the positive feedback (seriously!). It's encouraging to see that my efforts are appreciated. This really helps to keep the motivation up.

PS: (*) Color emphasis added for Amazon. If you are reading this, please do us all a favor and consider it.

Last edited by ixtab; 05-30-2012 at 07:25 PM.
ixtab is offline   Reply With Quote
Old 05-30-2012, 04:55 PM   #167
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 204
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, PW3
@ixtab

You don't need to download a KF8 book. Simply download and install "Kindle Previewer" from Amazon (it's free) and open any ePub. The previewer will build a mobi file containing both the mobi8 and mobi6 versions. It will be then opened in the previewer where you'll be able to simulate the various kindle devices: Kindle Fire, Kindle 4, DX, Kindle for iPhone and for iPad. There's not a specific entry for Kindle Touch, but - apart from screen size and colour - it renders KF8 like the fire.

I made this Galileo Galilei book (copyright free) this way.

Otherwise you can download an Amazon KF8 sample from this post. It's just a sample, but an interesting one, with embedded fonts (actualy a subsetted one).

I don't know where your code is intended to interact with the kinlde process queue. By the way, if you could add your code where HTML gets parsed, instead of where it gets rendered, you would simply need to add some ­ on the fly, and let the rendering engine of the kindle do the rest.

On the other hand - as you say - it would work only for KF8 books...
pirl8 is offline   Reply With Quote
Advert
Old 05-30-2012, 05:05 PM   #168
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
@pirl8: Only very quickly:

1. I suppose Kindle Previewer does not run on Linux, or does it?

2. My method (currently) patches something deep, deep inside the rendering code, so there is no HTML at that point anymore. It's just letters.

But thanks anyway for the hints, I'll take a look at it.
ixtab is offline   Reply With Quote
Old 05-30-2012, 05:28 PM   #169
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 204
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, PW3
Quote:
Originally Posted by ixtab View Post
@pirl8: Only very quickly:

1. I suppose Kindle Previewer does not run on Linux, or does it?
No, but KindleGen does (i386). It does not render eBooks but makes mobi files (mobi6+mobi8) from ePub. Actually the previewer uses KindleGen.

Quote:
2. My method (currently) patches something deep, deep inside the rendering code, so there is no HTML at that point anymore. It's just letters.
Ok. I guess it won't be easy at that level to deal with different sized fonts, text within tables, and different styles.

Also consider that the KF8/AZW3/Mobi8 rendering engine of the kindle behaves differently from the Mobi6 one: if the text is justified, lines are always stretched to the right. Maybe you can adapt some code from there.
pirl8 is offline   Reply With Quote
Old 05-31-2012, 04:15 AM   #170
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by ixtab View Post
@eureka: I'm using Eclipse for a good reason (well, at least, a good reason for me): it makes life much easier while developing. I'm aware that the compiling step could be extracted into a javac task in the ant file, but it's just not worth the hassle for me. Anybody who is in for serious patch development needs a correctly set up IDE, which includes both the Amazon jars, as well as jbpatch and serp, anyway.
IDE != Eclipse. What about a Vim or Emacs or gedit or Kate or Sublime Text 2 or TextMate or Notepad++ or, heck, stock Windows Notepad? They could be a good IDE for serious patch development. Patch isn't a big deal, just several (or, maybe, just one) Java classes. And JD-GUI is a good standalone Java decompiler with GUI for decompiled source view, which can be used instead JadClipse.

Anyway, lack of documentation about compiling of jbpacher doesn't relate to IDE choice. You've not left any chance to me, who don't know a bit about instrumental infrastructure of Java development. I don't think it was intentional act, but I hope you'll think about people like me (and about people with other IDE).
eureka is offline   Reply With Quote
Advert
Old 05-31-2012, 06:43 AM   #171
wl.
Enthusiast
wl. shares his or her toyswl. shares his or her toyswl. shares his or her toyswl. shares his or her toyswl. shares his or her toyswl. shares his or her toyswl. shares his or her toyswl. shares his or her toyswl. shares his or her toyswl. shares his or her toyswl. shares his or her toys
 
Posts: 27
Karma: 5790
Join Date: Jan 2009
Location: moscow, russia
Device: Kindle Touch, Sony PRS-505
Quote:
Originally Posted by eureka View Post
IDE != Eclipse.
yeah, i personally prefer IntelliJ IDEA )
looks like, amazon devs uses NetBeans
wl. is offline   Reply With Quote
Old 05-31-2012, 07:38 AM   #172
uwndrd
Member
uwndrd has learned how to read e-booksuwndrd has learned how to read e-booksuwndrd has learned how to read e-booksuwndrd has learned how to read e-booksuwndrd has learned how to read e-booksuwndrd has learned how to read e-booksuwndrd has learned how to read e-booksuwndrd has learned how to read e-books
 
Posts: 16
Karma: 910
Join Date: Feb 2012
Device: K3, K4, PRS-650
Uhh, that margin hack does indeed look nice. I suppose, no one is working on porting of this hack to K3/K4NT?
uwndrd is offline   Reply With Quote
Old 05-31-2012, 04:08 PM   #173
elRicharD
Enthusiast
elRicharD began at the beginning.
 
Posts: 39
Karma: 10
Join Date: May 2012
Device: Kindle Touch
ixtab, this is my first post and I have to say THANK YOU for what you are doing. Amazon should be putting you in their payroll, you are fixing their functionality issues for free. I did a hack to change margins using Launcher scripts, but what you did is much cleaner and better.

I had an issue with jbpatch, it installed OK, but no plugins were working until I copied manually the contents of /opt/jbpatch to /var/local/jbpatch. Is this me being an idiot or there is something wrong somewhere? I have a KT with FW 5.1.0 and I thought I followed the README instructions carefully...

Another question that you might know the answer... is there a way to add the MP3 player and the browser to the Launcher menu?

Thanks again and keep up the good work! You rock!
elRicharD is offline   Reply With Quote
Old 05-31-2012, 05:17 PM   #174
puxxi2003
Member
puxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to beholdpuxxi2003 is a splendid one to behold
 
Posts: 15
Karma: 19708
Join Date: May 2012
Device: Kindle Touch & Tolino
first, great work ixtab
like jbpatch

@elRicharD
maybe (i think) you have "config.txt" instead of "CONFIG.TXT" in /opt/jbpatch
puxxi2003 is offline   Reply With Quote
Old 05-31-2012, 05:54 PM   #175
elRicharD
Enthusiast
elRicharD began at the beginning.
 
Posts: 39
Karma: 10
Join Date: May 2012
Device: Kindle Touch
Quote:
Originally Posted by puxxi2003 View Post
first, great work ixtab
like jbpatch
@elRicharD
maybe (i think) you have "config.txt" instead of "CONFIG.TXT" in /opt/jbpatch
Nope, CONFIG.TXT is in upper case. I just fixed the thing doing

cd /opt/jbpatch
cp * /var/local/jbpatch

hinted by what I saw on the log file. I just wanted to know if this is expected, because someone else might have the same issue and what I did could be of help.
elRicharD is offline   Reply With Quote
Old 05-31-2012, 06:00 PM   #176
Bonex
Connoisseur
Bonex began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Oct 2010
Device: KDXG, Kobo Glo, Kobo Aura HD
Quote:
Originally Posted by ixtab View Post
Just a short "Work in Progress" announcement: I'm currently looking into .mobi/.azw hyphenation.
It is possible?! Great!!
I hope one day your patches will be available for the KDXG too!
Bonex is offline   Reply With Quote
Old 06-01-2012, 03:57 AM   #177
aditya3098
Guru
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
Quote:
Originally Posted by ixtab View Post
@pirl8: Only very quickly:

1. I suppose Kindle Previewer does not run on Linux, or does it?
Try it on wine.
aditya3098 is offline   Reply With Quote
Old 06-01-2012, 03:59 AM   #178
aditya3098
Guru
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
Idea for patch: An entry in the setting screen where users can activate/deactivate jbpatches, like activating/deactivating keyboards.
aditya3098 is offline   Reply With Quote
Old 06-01-2012, 08:05 AM   #179
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by aditya3098 View Post
Try it on wine.
And if that does not work, maybe try it while on vodka.
Otherwise, you may have to switch to whatever lab126 normally smokes.
knc1 is offline   Reply With Quote
Old 06-01-2012, 08:25 AM   #180
Zema
Member
Zema began at the beginning.
 
Posts: 10
Karma: 12
Join Date: May 2012
Device: Kindle Touch
Quote:
Originally Posted by elRicharD View Post
I had an issue with jbpatch, it installed OK, but no plugins were working until I copied manually the contents of /opt/jbpatch to /var/local/jbpatch. Is this me being an idiot or there is something wrong somewhere? I have a KT with FW 5.1.0 and I thought I followed the README instructions carefully...
I've made exactly the same mistake! You shouldn't copy opt/jbpatch into root, but simply put it into USB drive (or /mnt/usb) and Kindle will automatically move this into /var/local/ after restart. I suggest this point should be clarified in the README.
Zema is offline   Reply With Quote
Reply

Tags
jbpatch, kindle touch hacks


Forum Jump


All times are GMT -4. The time now is 08:21 AM.


MobileRead.com is a privately owned, operated and funded community.