05-28-2012, 04:43 PM | #151 | |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
But I think I can understand where it's coming from. Yes, random text files as instructions for patching Java part of UI is bad. However, BeanShell syntax (for script file) has minimal differencies with original Java syntax. So the only difference between script and .class (and the only barrier for script kiddie) will be in invoking javac. It's pretty easy in fact. (But become tedious). And it's a bit harder to audit random .class files than random text files with scripts. Anyway, I'm not arguing because of preaching for embedding script engine. Just advocating the devil Question isn't in form of distribution channel (packages or archives or anything). Question is (or was) in form of distributed product. |
|
05-28-2012, 05:18 PM | #152 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
[WiP] Hyphenation
Just a short "Work in Progress" announcement: I'm currently looking into .mobi/.azw hyphenation.
Yes, besides tampering around with the internals of the KT, I'm also actually using it to read books ... and there is one thing that has always seriously bugged me: the page layout. In principle, text is justified... well, except if there are long words. And my native language features a lot of long words, so the result is rather ugly to read on the Kindle. Interestingly enough, the mobi reader of the Kindle actually does include hyphenation support, but it is deactivated by default, most probably because it's simply buggy. The screenshot below shows a very, very early development version of an attempt to fix this. Notes:
As said, this is still under development, and I have no idea when it will be ready to be published, especially because correct hyphenation is language dependent. If you think you can help with this, whether "technically" or "linguistically", all suggestions are really appreciated. PS: +300 Karma for the first person to comment about the book that the above excerpt is from. And please, don't cheat - either you have actually read the book, and your answer is interesting, or you just googled it up, and your answer is worthless (... but if you already went through the pain of looking it up, then just read it - It's free, it's a classic of literature, and it's really worth reading!) . Last edited by ixtab; 05-28-2012 at 06:54 PM. |
05-28-2012, 05:42 PM | #153 | |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
i.e. a handicap is given to German-speaking users |
|
05-28-2012, 06:14 PM | #154 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Yep, there is indeed a slight "advantage" for germans, because the text was written by some german guy - but it won't ever be chinese, as per your russian suggestion - ma chi se ne frega? À vrai dire, ça ne change rien du tout.
(Oh dear, international forums can get complicated... ) Last edited by ixtab; 05-28-2012 at 06:30 PM. |
05-28-2012, 07:28 PM | #155 | |
Enthusiast
Posts: 35
Karma: 10
Join Date: Feb 2012
Location: Indonesia
Device: Kindle Touch 5.1.0
|
Quote:
Glad to read this one |
|
05-28-2012, 07:41 PM | #156 | |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
|
|
05-28-2012, 08:39 PM | #157 | |
Enthusiast
Posts: 35
Karma: 10
Join Date: Feb 2012
Location: Indonesia
Device: Kindle Touch 5.1.0
|
Quote:
Hmm..will there be support for arabic with your hack? currently it displays arabic but doesnt support RTL (on mobi/azw). for the time and effort to develop the hacks. Last edited by alaiksander; 05-28-2012 at 09:18 PM. |
|
05-29-2012, 12:44 AM | #158 |
Addict
Posts: 396
Karma: 33660
Join Date: Jul 2011
Device: Kindle 3, Kindle 4, Kindle PW, Nexus7 3G
|
Should be Goethe, have read it in school ages ago. But its too long ago to write something useful about , have to read first again ...
Other possibility is it is a part of the history that led to the findings of the recipe of "Werthers Echte" ;-)))) And I am quite astonished again and again about your work and now as well about your education ..., much broader than usual, Goethe, language skills ... Last edited by diba; 05-29-2012 at 01:05 AM. |
05-29-2012, 01:51 AM | #159 |
Zealot
Posts: 125
Karma: 769546
Join Date: May 2012
Device: none
|
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.
|
05-29-2012, 12:18 PM | #160 |
Zealot
Posts: 127
Karma: 6744
Join Date: Dec 2011
Device: Kindle Touch, PW2, PW5
|
@ixtab
just want to say that the Margin Patch works perfectly. i could never understand why Amazon sets a big margin of 120 for the "fewest" setting in the first place. as for the Java hack, the only problem encountered is with Home Screen landscape orientation - the author names are cut off partly. thank you so much for your great work |
05-29-2012, 04:00 PM | #161 | |
Junior Member
Posts: 3
Karma: 310
Join Date: Dec 2011
Device: Kindle Touch
|
Quote:
At school it was rather boring because of the exercises ("write a dialogue..."), but defnitely worth reading! In addition: Great job, ixtab! Support of hyphenation would be awesome, especially for german texts Maybe some day I will start developing for kindle touch, but for now... university |
|
05-30-2012, 02:18 AM | #162 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
@ixtab, can you say how to compile jbpatcher from command-line?
I've cloned Git repo, found that ant build creates jbpatch.jar. But there were two problems. I've solved first of them (created directory lib and coiped there serp.jar). Second one is pretty tough to me: how to compile all .java file into .class files. The best solution I've came to is: Code:
CLASSPATH=/usr/share/java/serp.jar:src:$CLASSPATH javac src/**/*.java Spoiler:
Should I copy stock Amazon jars somewhere at my computer and add them to classpath or there is better solution? I don't know anything about Java (not coding Java at all) I'm compiling jbpatcher on Debian, I've installed serp as package (libserp-java). And I don't need no stinking Eclipse UPD Found a way. Create a lib directory in root of jbpatcher sources, then put there serp.jar and all JARs from Kindle's /opt/amazon/ebook/lib and /opt/amazon/ebook/booklet (not all of them are strictly needed, but I don't want to check which are and which aren't). Then create a bin directory in root of jbpatcher sources and put there following shell script: Code:
CPATH="$(find lib -type f -name '*.jar' -print0 2>/dev/null | tr '\0' ':')" SRC="$(find src -type f -name '*.java' -print0 2>/dev/null | tr '\0' ' ')" javac \ -classpath "$CPATH" \ -sourcepath src \ -source 1.4 \ -target 1.4 \ -d bin -s bin \ $SRC I believe this shell script should be implemented as Ant javac Task. But I don't understand why it wasn't by default. Maybe it shouldn't because of some Java voodoo... Last edited by eureka; 05-30-2012 at 06:01 AM. Reason: found a way to compile it, yippie ki-yay |
05-30-2012, 02:48 AM | #163 |
Member
Posts: 10
Karma: 12
Join Date: May 2012
Device: Kindle Touch
|
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.
Last edited by Zema; 05-30-2012 at 02:54 AM. |
05-30-2012, 08:11 AM | #164 |
Member
Posts: 11
Karma: 10
Join Date: Dec 2011
Device: kindle touch 5.1
|
Thanks for your hard work ixtab, that is a marvelous application. The most useful plugin for me is the margin patch, I'm really grateful that this grave issue has been solved.
|
Tags |
jbpatch, kindle touch hacks |
Thread Tools | Search this Thread |
|