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 03-15-2020, 01:22 PM   #1
xnohat
Junior Member
xnohat began at the beginning.
 
xnohat's Avatar
 
Posts: 3
Karma: 10
Join Date: Mar 2020
Device: Kindle Paperwhite
Post Script generate WordWise for all type of ebook

Hello everyone,

I've create a simple script to generate WordWise for all type of ebook. My work based on research of @m1lovanovt. Instead of generate Wordwise information for .mobi file (Amazone Kindle Format), I try to using <ruby> html tag to generate WordWise format on any type of ebook. There are some bugs still need to fix, welcome to your contributions !

Hope this script will help others love this Wordwise feature like me.



Here is source code https://github.com/xnohat/wordwisecreator

You need to have calibre on your device.

usage: php wordwisecreator.php input_file hint_level
input_file : path to file need to generate wordwise
hint_level : from 1 to 5 default is 5, 1 is less wordwise hint show - only hard word will have definition, 5 is all wordwise hints show
Attached Thumbnails
Click image for larger version

Name:	WordWise-GeneratedTest.png
Views:	2292
Size:	225.9 KB
ID:	177736  

Last edited by NiLuJe; 03-15-2020 at 03:08 PM. Reason: Inlined the thumbnail to avoid breaking forum layout.
xnohat is offline   Reply With Quote
Old 03-16-2020, 05:59 AM   #2
Uphantom89
Enthusiast
Uphantom89 began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Nov 2018
Device: Kobo Touch
May I ask the purpose of generating word wise for other ebook format out of .mobi file?
Will the word wise also appear on a non-kindle device or will koreader show word wise epub file ?
Thank you

Last edited by Uphantom89; 03-16-2020 at 11:31 AM.
Uphantom89 is offline   Reply With Quote
Advert
Old 04-03-2020, 03:27 AM   #3
xnohat
Junior Member
xnohat began at the beginning.
 
xnohat's Avatar
 
Posts: 3
Karma: 10
Join Date: Mar 2020
Device: Kindle Paperwhite
Quote:
Originally Posted by Uphantom89 View Post
May I ask the purpose of generating word wise for other ebook format out of .mobi file?
Will the word wise also appear on a non-kindle device or will koreader show word wise epub file ?
Thank you
Yes, this will show word-wise for epub file and for all non-kindle device
xnohat is offline   Reply With Quote
Old 04-17-2020, 02:45 PM   #4
AmirHXe
Member
AmirHXe began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Apr 2018
Device: none
could you please explain how to use this?
thanks
AmirHXe is offline   Reply With Quote
Old 04-20-2020, 03:38 PM   #5
arooni
Addict
arooni began at the beginning.
 
Posts: 315
Karma: 26
Join Date: Jul 2012
Device: Kindle Paperwhite 4 (2018)
Would this work for foreign languages? Would be *amazing* to have this for me trying to read a book in spanish (would like to see english words underneath the spanish words)
arooni is offline   Reply With Quote
Advert
Old 04-21-2020, 06:07 AM   #6
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,016
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
It could, but I think @xnohat dictionary is sourced from the Amazon WordWise sql file, which at this time is english only. You would have to supply a dictionary WordWizing from spanish.
PoP is offline   Reply With Quote
Old 04-22-2020, 01:11 PM   #7
Homer55
Enthusiast
Homer55 began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Aug 2016
Device: Kobo
Hi, I don't understand how to use this, could someone explain how to? thanks in andvance.
Homer55 is offline   Reply With Quote
Old 04-24-2020, 07:38 PM   #8
javijavier
Junior Member
javijavier began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2009
Device: Kindle 2
Hi xnohat,

I've this error:

Code:
$ php wordwisecreator.php /Users/xxx/test_book.azw3 5
[+] Load Stop Words 
[+] Load Wordwise Dict 
[+] Clean old temps 
[+] Convert Book to HTML 
[+] Load Book Contents 

Warning: file_get_contents(book_dump_html/index.html): failed to open stream: No such file or directory in /Users/xxx/Downloads/wordwisecreator/wordwisecreator.php on line 61
[+] Process (1) Words 
[+] Create New Book with Wordwised 

Warning: file_put_contents(book_dump_html/index.html): failed to open stream: No such file or directory in /Users/xxx/Downloads/wordwisecreator/wordwisecreator.php on line 115
[+] 3 book EPUB, AZW3, PDF with wordwise generated Done !
I run it on Mac High Sierra 10.13.6 - Calibre 3.48 - PHP 7.1.33

Any help?

Thanks!
javijavier is offline   Reply With Quote
Old 05-13-2020, 12:07 PM   #9
ntan234
Junior Member
ntan234 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2016
Device: NOOK simple
Thank for the tool.
I edited some style to add the bracket above.
However, we need to agree that it's still not perfect, hope you can to make it like real
Ref: https://jsfiddle.net/fgnp07ty/1/
-----
Line 99-100: can use ruby or span data-tooltip
Line 117-119: add "--extra-css ./ruby.css" while converting
Click image for larger version

Name:	InkedKindle_Word_Wise_test-Doitsu-wordwised_Page1_LI_1_1.jpg
Views:	1003
Size:	907.9 KB
ID:	179221
code.zip
ntan234 is offline   Reply With Quote
Old 02-03-2022, 02:01 PM   #10
sprazer
Member
sprazer began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2018
Device: Kindle Voyage
Quote:
Originally Posted by xnohat View Post
Yes, this will show word-wise for epub file and for all non-kindle device
Does it work with other application besides kindle app?

I am using Moonreader on an android tablet to read .mobi file
sprazer is offline   Reply With Quote
Old 02-09-2022, 04:43 PM   #11
sprazer
Member
sprazer began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2018
Device: Kindle Voyage
Quote:
Originally Posted by ntan234 View Post
Thank for the tool.
I edited some style to add the bracket above.
However, we need to agree that it's still not perfect, hope you can to make it like real
Ref: https://jsfiddle.net/fgnp07ty/1/
-----
Line 99-100: can use ruby or span data-tooltip
Line 117-119: add "--extra-css ./ruby.css" while converting
Attachment 179221
Attachment 179220


Dude, seriously can you make a tutorial how to do this?
I am considering buyin a kobo instead of kindle but Wordwise is holding me back

If this works with anytype of files and can be run on kobo It would be really awesome!!
sprazer is offline   Reply With Quote
Old 02-09-2022, 04:53 PM   #12
sprazer
Member
sprazer began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2018
Device: Kindle Voyage
Can someone please actually explain how to use this from a user point of view?
sprazer is offline   Reply With Quote
Old 02-09-2022, 05:41 PM   #13
sprazer
Member
sprazer began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Aug 2018
Device: Kindle Voyage
Ok I found out how to run the script!!! this is great!! I can read the file on any app and see the wordwise!!!

one question, is the wordwise translation actually accurate as amazon kindle?

Last edited by sprazer; 02-10-2022 at 05:57 PM.
sprazer is offline   Reply With Quote
Old 02-13-2022, 03:09 PM   #14
boriar
Evangelist
boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.
 
boriar's Avatar
 
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
Quote:
Originally Posted by sprazer View Post
Ok I found out how to run the script!!! this is great!! I can read the file on any app and see the wordwise!!!

one question, is the wordwise translation actually accurate as amazon kindle?
Can you explain how you do it?
boriar is offline   Reply With Quote
Old 04-07-2022, 12:34 AM   #15
phiskim
Junior Member
phiskim began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Apr 2022
Device: kindle
I made wordwise in Korean version

Quote:
Originally Posted by arooni View Post
Would this work for foreign languages? Would be *amazing* to have this for me trying to read a book in spanish (would like to see english words underneath the spanish words)
phiskim is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to generate a TOC as a page in the eBook? alegriadelarte Editor 11 05-23-2018 09:16 AM
PRS-T2 script to generate collections stegro Sony Reader Dev Corner 8 01-05-2018 03:58 AM
Generate eBook from Bookmarks Archive vaniaspeedy General Discussions 0 01-01-2013 10:44 PM
Script to generate thumbnails Jellby Bookeen 0 01-02-2010 11:51 AM
Script to Generate Stanza Online Catalog for your Iphone/Touch RoninTech Calibre 117 09-05-2009 12:45 AM


All times are GMT -4. The time now is 01:15 PM.


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