GithubHelp home page GithubHelp logo

wisecreator's People

Contributors

arnaud512 avatar felixonmars avatar geyser avatar nqhung291 avatar realhamburger avatar tikotik avatar tmilovanov avatar zpcc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wisecreator's Issues

KindleUnpack lib error

version 1.1 worked well, but when I try the latest version(2.0),
It reported cannot find lib.unpackBook

testbooks liu$ wisecreator orson.mobi
Traceback (most recent call last):
File "/Users/liu/pyproject/wisecreator2/env/bin/wisecreator", line 5, in
from wisecreator.main import main
File "/Users/liu/pyproject/wisecreator2/env/lib/python3.9/site-packages/wisecreator/main.py", line 14, in
from wisecreator import book as ww_book
File "/Users/liu/pyproject/wisecreator2/env/lib/python3.9/site-packages/wisecreator/book.py", line 12, in
from wisecreator.third_party.KindleUnpack.lib.kindleunpack import unpackBook
ModuleNotFoundError: No module named 'wisecreator.third_party.KindleUnpack'

UnicodeDecodeError

Hi,

Please see the error below, while running the python file

F:\enable_wordwise>python main.py Train_To_Pakistan_-_Khushwant_Singh.mobi
[.] Checking dependenices
[.] Converting mobi 2 mobi to generate ASIN
[.] Getting ASIN
[.] Getting rawml content of the book
[.] Collecting words
[.] Count of words: 43758
Traceback (most recent call last):
  File "main.py", line 396, in <module>
    main()
  File "main.py", line 359, in main
    f = f.read().decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 11506: invalid continuation byte

It seems to be some error with senses.csv , appriciated a quick look

Word level

Kindle's word wise supports level for words. Is there any way to support in within this script?
Do you know?

errors constantly occur

Hi~When I use wisedumb in calibre, some errors constantly occur, whatever what type of file I put in.

Traceback (most recent call last):
File "C:\Users\M\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\urllib3\connectionpool.py", line 700, in urlopen
File "C:\Users\M\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\urllib3\connectionpool.py", line 994, in prepare_proxy
File "C:\Users\M\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\urllib3\connection.py", line 364, in connect
File "C:\Users\M\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\urllib3\connection.py", line 499, in connect_tls_proxy
File "C:\Users\M\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\urllib3\util\ssl
.py", line 453, in ssl_wrap_socket
File "C:\Users\M\AppData\Roaming\calibre\plugins\worddumb-libs-py3.8\urllib3\util\ssl
.py", line 495, in _ssl_wrap_socket_impl
File "ssl.py", line 500, in wrap_socket
File "ssl.py", line 1040, in _create
File "ssl.py", line 1309, in do_handshake
OSError: [Errno 0] Error

UnicodeDecodeError: 'cp950' codec

Hi,
i have encountered some problems when running 'wisecreator.exe' on window 10. Any thought?

[.] Checking dependenices
[.] Converting mobi 2 mobi to generate ASIN
[.] Getting ASIN
[.] Getting rawml content of the book
[.] Collecting words
[.] Count of words: 45754
Traceback (most recent call last):
  File "main.py", line 395, in <module>
  File "main.py", line 359, in main
UnicodeDecodeError: 'cp950' codec can't decode byte 0xe2 in position 6708: illegal multibyte sequence
[8108] Failed to execute script main

Can you add support to epub?

Amazon dropped mobi extension as supported, but epub is now supported. Can you add epub as compatible extension?

License?

Is there a license for this project? A permissive license would allow for this project to help make high quality public ebooks like Standard Ebooks.

Sample books is not showing wordwise in kindle mobile app

I have downloaded one of the sample books of yours and send it to kindle mobile app via *@kindle.com email id, however i do not see word wise enabled for the books, can you please let me know if this only works for kindle device or kindle mobile app too...?

Kfx file

Can you make the code word for kfx file, instead of mobi?
I using kindle for android, and vertical scrolling only available for kfx file. (used Calibre to convert azw3 to kfx)

unable to open database file

screen

The language book's metadata is eng.
The book given in input to wisecreator was in .mobi ,
Someone help me???
With another book it works.

How can I bypass this thing.

mint@mint:~/Calibre Library/Leigh Bardugo/Ruin and Rising_ Book 3 (14)$ ./wisecreator rr.mobi
[.] Checking dependencies
[.] Getting ASIN
[.] Getting rawml content of the book
Traceback (most recent call last):
File "wisecreator/main.py", line 334, in
File "wisecreator/main.py", line 330, in main
File "wisecreator/main.py", line 314, in process
File "wisecreator/main.py", line 288, in wordwise
File "wisecreator/book.py", line 25, in get_glosses
File "wisecreator/book.py", line 97, in _get_rawml_content
FileNotFoundError: [Errno 2] No such file or directory: 'rr-WordWised/unpacked/mobi7/rr.rawml'
[4722] Failed to execute script main

How to bypass this thing

mint@mint:~/Calibre Library/Leigh Bardugo/Ruin and Rising_ Book 3 (14)$ ./wisecreator rr.mobi
[.] Checking dependencies
[.] Getting ASIN
[.] Getting rawml content of the book
Traceback (most recent call last):
File "wisecreator/main.py", line 334, in
File "wisecreator/main.py", line 330, in main
File "wisecreator/main.py", line 314, in process
File "wisecreator/main.py", line 288, in wordwise
File "wisecreator/book.py", line 25, in get_glosses
File "wisecreator/book.py", line 97, in _get_rawml_content
FileNotFoundError: [Errno 2] No such file or directory: 'rr-WordWised/unpacked/mobi7/rr.rawml'
[4722] Failed to execute script main

ModuleNotFoundError: No module named 'dataclasses'

I got this problem on win10 python3

D:\Dicts\programs\wisecreator-1.0>wisecreator ./test_books/wild.mobi
Traceback (most recent call last):
File "C:\Python\Python36\Scripts\wisecreator-script.py", line 11, in
load_entry_point('wisecreator==1.0.0', 'console_scripts', 'wisecreator')()
File "C:\Python\Python36\lib\site-packages\pkg_resources_init_.py", line 487, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python\Python36\lib\site-packages\pkg_resources_init_.py", line 2728, in load_entry_point
return ep.load()
File "C:\Python\Python36\lib\site-packages\pkg_resources_init_.py", line 2346, in load
return self.resolve()
File "C:\Python\Python36\lib\site-packages\pkg_resources_init_.py", line 2352, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "C:\Python\Python36\lib\site-packages\wisecreator\main.py", line 15, in
from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'

I fixed it after execute "pip install dataclasses"
Hope it could be fixed and others do not need to do this

Is there a way to embed the Word Wise content into the mobi?

Hi. I was wondering if you know a way to generate such a EPUB for iOS devices.

Amazon hasn't implement Word Wise in their iOS Kindle app yet (maybe never). So I was thinking it'll be great if I can

  1. Generate the Word Wise database with wisecreator
  2. Choose a Word Wise level
  3. Somehow embed the Word Wise hints in the original .mobi file
  4. Convert the .mobi to a .epub to read on iOS

ASIN Handling

If a book already contains an ASIN (processed with Calibre or had an Amazon one injected manually), there's no need to convert it again to generate one. The script should check for the presence of one first and only do the conversion if it's missing. The conversion also changes the markup which causes location issues with X-Ray files generated for the original mobi.

Time to create a new release?

There are some improvement and fixes (UnicodeDecodeError and level support) since the last release. Maybe it's time to create a new release?

Incorrect translations

Hi,
some words seem to have an incorrect translation assigned to them. I would like to play around with it a bit, and maybe improve it. However, from what I can tell you just assign sense_id to a word and kindle puts a translation there. Therefore I would like to ask you - how did you find out the sense ids for all the words in the file "senses.csv"?

Word Wise in a single file

I don't if it's an issue, but i think it would be better to have an option which generate Word Wise for the selected file and doesn't create another file and folder, because now it's hard to maintain files in calibre.
Thank you.

README document improvement suggestion

I suggest adding pip install wheel in the script section.

Below are the details:

I followed the 'Script' instruction on my Mac. And the command python3 -m pip install . always complained of an error with a message that said: invalid command 'bdist_wheel.'

After some search, this error was caused by not installing 'wheel.' I installed the wheel using pip install wheel, and everything works like a charm.

problem with mobitool-linux-i386

hi
when I try to use wisecreator get this error

 [-] Can't get ASIN:
    | Failed to run command
| /mypath/wisecreator/third_party/mobitool-linux-i386 /mypath/wisecreator/test books/Bernard Shaw - Pygmalion-WordWised/Bernard Shaw - Pygmalion.mobi

mobitool-linux-i386 file is in location

Word wise not showing in Kindle Android app

I follow the steps as written in the README

  1. I use the Windows exe to generate the kll and the new mobi files from this sample
  2. Rename the kll filename to WordWise.en.eedb7b5f-dfa1-4621-888c-1485e4bc78e4.db
  3. Copy the new mobi to Android/data/com.amazon.kindle/files
  4. Copy db file to /data/user/0/com.amazon.kindle/databases
  5. I use Adb shell to cd to /data/user/0/com.amazon.kindle/databases
  6. Run command ls -Z to get the proper group & security context. it shows u:object_r:app_data_file:s0:c512,c768
  7. Run command chcon u:object_r:app_data_file:s0:c512,c768 WordWise.en.eedb7b5f-dfa1-4621-888c-1485e4bc78e4.db
  8. Rum command ls -Z again to ensure the db has updated the permission
  9. Run Kindle Android app, the newly added ebook appear in the library
  10. Word wise didn't show up at the bottom of the app

Not sure where went wrong.

My Kindle Android app version is 8.38.0.100

PermissionError: [WinError 31] A device attached to the system is not functioning

Hi team,
I am trying to test wisecreator, but I keep getting the following error,
Do you have an ideas how to solve this ?

--

C:\Users\MyUserNamel\Documents\WordWise\wisecreator-master\executables>wisecreator.exe "Bernard Shaw - Pygmalion.mobi"
[.] Checking dependenices
[.] Converting mobi 2 mobi to generate ASIN
[.] Getting ASIN
[.] Getting rawml content of the book
[.] Collecting words
[.] Count of words: 26215
[.] Processing words: |----------------------------------------| 1.2% Traceback
(most recent call last):
File "main.py", line 394, in
File "main.py", line 383, in main
File "main.py", line 59, in print_progress
PermissionError: [WinError 31] A device attached to the system is not functioning
[3252] Failed to execute script main
Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='utf-8'>
PermissionError: [WinError 31] A device attached to the system is not functioning

Wordwise Generation for Kindle android app

Is there a way to add the generated wordwise kll file for android kindle app?
I observed that wordwise information for the app is stored at /data/data/com.amazon.kindle/databases/wordwise/wordwise.kll.en.en.db as a single file for all downloaded books,
And Wordwise.override.[asin].en.db - maybe for matching above file to each book

Can you look into it in future for matching sideloaded books with wordwise.kll file?
Thanks.

UnicodeDecodeError

[.] Checking dependenices
[.] Converting mobi 2 mobi to generate ASIN
[.] Getting ASIN
[.] Getting rawml content of the book
[.] Collecting words
[.] Count of words: 45156
Traceback (most recent call last):
File "main.py", line 395, in
File "main.py", line 359, in main
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 6710: illegal
multibyte sequence
[1540] Failed to execute script main

Could you have a fixed exe file please?

Error: Resource averaged_perceptron_tagger not found

I'm facing following error when I'm running the utility through the source code;

  File "~/.local/lib/python3.8/site-packages/nltk/data.py", line 585, in find
    raise LookupError(resource_not_found)
LookupError: 
**********************************************************************
  Resource averaged_perceptron_tagger not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('averaged_perceptron_tagger')
  
  For more information see: https://www.nltk.org/data.html

  Attempted to load taggers/averaged_perceptron_tagger/averaged_perceptron_tagger.pickle

Though It is generating the Language layer file (ie .kll) But getting no word wise hint when opening the ebook on Kindle.

Output format

Hello!

After long hours of looking for this gem, long hours to try and run the program on Linux (only have a Mac available or work computer on which I couldn't run the .exe due to policy) when I finally managed to convert an ebook using the script, I shed a tear realising my reader doesn't support .mobi format. I'd contacted their tech support to see if there was any pending update or ANYTHING that could make it support .mobi (I'm very hopeful sometimes) but got a generic answer that .mobi format belongs to Amazon.
Now this is my last cry of help before I totally give up, I kinda know the answer already but just to be sure: it can only be in .mobi format, right ? My reader only support ePub (along with PDF, TXT, HTML, FB2 but don't think any of those would help either) format. Any way around this ?

Thanks in advance for your answer and super good job on that one !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.