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 02-23-2015, 07:25 AM   #751
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by barobach_so View Post
but koreader how has a RTL and LTR option in reflow engine ? when I read a pdf with koreader I can change this option.
AFAIK, KOReader uses K2pdfopt as the reflow engine, which treats PDF files like images and doesn't require character shaping.

Quote:
Originally Posted by barobach_so View Post
there is a glossary.BGL that say it is graphical and no need font ( I don't know really waht is it ), can it be somehow helpful ?
Since sdcv is a command line program and the KOReader code only returns text, you can't use dictionaries with pictures in them.

Quote:
Originally Posted by barobach_so View Post
I'm thinking of change bgl to html (babylontohtml program ) and have a html glossary ( already have ) then revers the characters somehow and maybe connect them to each other by test mechanics....)
You could convert the .bgl file to a .babylon (GLS) file with StarDict Editor, edit the .babylon file and finally compile it to a StarDict dictionary, however, character shaping and RTL handling isn't exactly a trivial matter.
Doitsu is offline   Reply With Quote
Old 02-23-2015, 11:05 AM   #752
Ebri
Groupie
Ebri began at the beginning.
 
Posts: 150
Karma: 48
Join Date: Apr 2014
Device: Kindle Paperwhite 2, Kobo Aura HD
Quote:
Originally Posted by guerrilla View Post
I'm still unsure about how I got stuck in this though. At a closer look it seems that that message is printed only when sdcv creates the cache file (.oft extension) and this should be the first time you search for a term. That's why this issue got unnoticed so far: you install your dictionary and search for a term, sdcv gives the "save to cache" message, json.decode fails to decode, koreader returns the dummy table, you think: "uh, word not present in the dictionary" and make another search which, from now on, goes smoothlessly.
For some reason I was getting that warning again and again.

Anyway, I will gladly do a report to github, I'm very happy to help
I am unsure about it, but in some cases on Kobo Aura HD dictionary gave up after some time, and haven't found anything, then after restarting koreader, it worked again. I am unsure, but it may be the same case (symptoms are the same, and it starts eg. after a wakeup.) I think I closed the related issue on github though.
Ebri is offline   Reply With Quote
Advert
Old 02-24-2015, 04:06 AM   #753
guerrilla
Connoisseur
guerrilla began at the beginning.
 
Posts: 68
Karma: 10
Join Date: Dec 2014
Device: Kindle Paperwhite
@Ebri You can find out if it's the same issue if you change in koreader.sh the line that goes:

Code:
./reader.lua "$@" 2> crash.log
in

Code:
./reader.lua -d "$@" 2> crash.log 1> koreader-debug.txt
You can use a convenient path for koreader-debug.txt, on kindle I use /mnt/us/documents/koreader-debug.txt so that I can easily access the file in the stock reader.
Then, next time you encounter a problem with a dictionary search, close koreader and open the log file. If there's a line in it that goes:

Code:
# JSON data cannot be decoded frontend/JSON.lua:525: frontend/JSON.lua:240: can't parse JSON at char 1 of: save to cache
that's this issue.
guerrilla is offline   Reply With Quote
Old 02-27-2015, 12:51 PM   #754
barobach_so
Connoisseur
barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.
 
Posts: 76
Karma: 25460
Join Date: Feb 2015
Device: kobo h2o
Quote:
Originally Posted by Doitsu View Post
AFAIK, KOReader uses K2pdfopt as the reflow engine, which treats PDF files like images and doesn't require character shaping.


Since sdcv is a command line program and the KOReader code only returns text, you can't use dictionaries with pictures in them.


You could convert the .bgl file to a .babylon (GLS) file with StarDict Editor, edit the .babylon file and finally compile it to a StarDict dictionary, however, character shaping and RTL handling isn't exactly a trivial matter.
hi
I have a txt glossary of en 2 persian dic that i reversed with arabshaping ( convert to srt then use arabshaping convert to txt )
but when I try to convert it to stardict format ( ifo ) in PyGlossary in ubuntu
it shows this error

usr/share/pyglossary/src/interface.py:88: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module.
p3 = os.popen3('dictzip')
/usr/share/pyglossary/src/interface.py:98: DeprecationWarning: os.popen3 is deprecated. Use the subprocess module.
p3 = os.popen3("%s '%s.dict'"%(dictzipCmd,filename))

and the output file ( have a size e.g. 26 mb ) doesnt show in koreader

any idea ?
barobach_so is offline   Reply With Quote
Old 02-27-2015, 01:57 PM   #755
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by barobach_so View Post
I have a txt glossary of en 2 persian dic that i reversed with arabshaping ( convert to srt then use arabshaping convert to txt ) but when I try to convert it to stardict format ( ifo ) in PyGlossary in ubuntu it shows this error [...]
According to the error message, Python complained about a line in interface.py. However, the latest pyGlossary version, 2010.05.29, doesn't contain interface.py.
It looks like you're using an older version of pyGlossary and/or maybe Python 3.4 instead of Python 2.7.

If you've installed pyGlossary with a package manager, download the latest version from the developer.

Quote:
Originally Posted by barobach_so View Post
[...] the output file ( have a size e.g. 26 mb ) doesnt show in koreader
To exclude conversion errors you may want to test your dictionary with GoldenDict first, which is also available for Linux.
If your dictionary works fine with GoldenDict, but doesn't work with KOReader, you might have to extract the .dict file from the .dz file, if pyGlossary has created one.
Doitsu is offline   Reply With Quote
Advert
Old 02-27-2015, 02:06 PM   #756
barobach_so
Connoisseur
barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.
 
Posts: 76
Karma: 25460
Join Date: Feb 2015
Device: kobo h2o
Quote:
Originally Posted by Doitsu View Post
According to the error message, Python complained about a line in interface.py. However, the latest pyGlossary version, 2010.05.29, doesn't contain interface.py.
It looks like you're using an older version of pyGlossary and/or maybe Python 3.4 instead of Python 2.7.

If you've installed pyGlossary with a package manager, download the latest version from the developer.


To exclude conversion errors you may want to test your dictionary with GoldenDict first, which is also available for Linux.
If your dictionary works fine with GoldenDict, but doesn't work with KOReader, you might have to extract the .dict file from the .dz file, if pyGlossary has created one.
hi
thanks for reply
i downloaded pyglossary from ubuntu software center
and output format is alreadey dz
.ifo .idx .idz

but i will test with other versions too

I should add
the owner of this link you sent to me is Saeed Rasuli also an Iranian and he send me the glossary
and second thing is when I run pyglossary in windows ( both GUI and cmd form ) the output file doesn't have any size only an icon

Last edited by barobach_so; 02-27-2015 at 02:09 PM.
barobach_so is offline   Reply With Quote
Old 03-01-2015, 03:04 AM   #757
barobach_so
Connoisseur
barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.
 
Posts: 76
Karma: 25460
Join Date: Feb 2015
Device: kobo h2o
We finally did it

Hi
with Doitsu & hawhill Guide and my friend help we finally have RTL Persian Dictionary in koreader
here is the picture : ( You can compare with post #745 )


here is the process:
convert babylon glossay to HTML file with BabylontoHtml
reverse the character order by Arabshaping
convert reveresed HTML to stardict ( ifo ) by stardict editor

add Persian unicode font to koreader font folder and change the defaults in font.lua in koreader

Last edited by barobach_so; 03-01-2015 at 04:06 AM.
barobach_so is offline   Reply With Quote
Old 03-02-2015, 11:57 AM   #758
Belenos
Connoisseur
Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.
 
Posts: 58
Karma: 6090
Join Date: Oct 2013
Device: PW
Does it support AZW3 files?
Belenos is offline   Reply With Quote
Old 03-03-2015, 04:17 AM   #759
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
@barobach_so: Great! And thanks for sharing the processing instructions!
@Belenos: No. You'd have to convert those.
hawhill is offline   Reply With Quote
Old 03-03-2015, 08:00 AM   #760
guerrilla
Connoisseur
guerrilla began at the beginning.
 
Posts: 68
Karma: 10
Join Date: Dec 2014
Device: Kindle Paperwhite
@barobach_so You should be able to right align the text in the quick lookup window too, maybe playing a little with frontend/ui/widget/dictquicklookup.lua?
guerrilla is offline   Reply With Quote
Old 03-03-2015, 03:43 PM   #761
barobach_so
Connoisseur
barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.
 
Posts: 76
Karma: 25460
Join Date: Feb 2015
Device: kobo h2o
Quote:
Originally Posted by guerrilla View Post
@barobach_so You should be able to right align the text in the quick lookup window too, maybe playing a little with frontend/ui/widget/dictquicklookup.lua?
Hi
on a trip now, I will test later
I think its because arabshaping it work on srt files in subtitles
and it happens there too
but I will test it

Thank you
barobach_so is offline   Reply With Quote
Old 03-04-2015, 04:46 AM   #762
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
I don't think right alignment is currently implemented. That would have to get implemented here: https://github.com/koreader/koreader...tboxwidget.lua - so don't bother to fiddle with the - higher level - dictquicklookup.
hawhill is offline   Reply With Quote
Old 03-04-2015, 11:46 AM   #763
Belenos
Connoisseur
Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.Belenos got an A in P-Chem.
 
Posts: 58
Karma: 6090
Join Date: Oct 2013
Device: PW
Quote:
Originally Posted by hawhill View Post
@Belenos: No. You'd have to convert those.
Thanks, any chances for a future support?
Belenos is offline   Reply With Quote
Old 03-05-2015, 03:03 AM   #764
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
You'd have to ask this the CREngine developer(s), but I think it is highly unlikely. CREngine started as a FB2 renderer, had EPUB2 (at least more than enough of it to be useful) added later. Switching that to EPUB3 compatibility is a major feat alone, adding support for a proprietary format on top of that is an immense amount of work. So no, I don't think that will happen soon.

Maybe if some new reader engine comes up, but where from?
hawhill is offline   Reply With Quote
Old 03-05-2015, 04:54 AM   #765
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
The Readium SDK? Granted, AFAICT, there's no proper Linux port (yet?), and it may or may not rely on a full webkit setup, but that's still potentially the best contender. (And what Kobo's using for their kepub ACCESS renderer, if I understood everything properly...).

Last edited by NiLuJe; 03-05-2015 at 06:55 AM.
NiLuJe is offline   Reply With Quote
Reply

Tags
application, k5 tools, kindle, koreader, launcher add-ons, lua, reader, touch


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KPV: a PDF reader for Kindle, based on muPDF, GPLv3 hawhill Kindle Developer's Corner 1056 11-11-2017 03:07 AM
Hacked Up Reader for epub/fb2/txt/rtf/html/pdb/etc bhaak Kindle Developer's Corner 296 10-01-2016 01:11 PM
html to fb2 or epub rulet Conversion 7 06-24-2012 05:54 PM
Raccoon Reader - reads ePub, fb2, fb2.zip, txt on WP7 for free Andrei_Shvydryk Reading and Management 0 10-31-2011 03:17 PM
A real PDF to epub/djvu/rtf/html software?. DsOft ePub 35 01-02-2011 03:57 PM


All times are GMT -4. The time now is 11:44 PM.


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