Code Monkey home page Code Monkey logo

Comments (3)

rupor-github avatar rupor-github commented on June 8, 2024 1
  1. When hyphenation turned off properly epub conversion just works (as expected):
.\fb2mobi.py --no-hyphenate "Поскитт К.-Математика для взрослых.Лайфхаки для повседневных вычислений-2016.epub"
INFO: Converting "Поскитт К.-Математика для взрослых.Лайфхаки для повседневных вычислений-2016.epub"...
INFO: Using profile "default".
INFO: Unpacking epub...
INFO: Processing epub...
INFO: Processing took 1.6 sec.
INFO: Running kindlegen...
INFO: Optimizing resulting file...
INFO: Book conversion completed in 26.91 sec.

This is not to say that it should not work with hyphenation on, but...

  1. Your fb2 books do not convert because they are not properly formatted, all of them have description block empty:
<description>
	<title-info>
		<genre></genre>
		<author>
			<first-name></first-name>
			<middle-name></middle-name>
			<last-name></last-name>
		</author>
		<book-title></book-title>
	</title-info>
</description>

and as a result fb2mobi generates such xhtml that kindlegen just silently fails.

  1. I tried to correct (or rather compensate for) all of the above in new version 3.3.5 - please, download and try it (although you may not like what you would get without correcting your fb2 files)

from fb2mobi.

rupor-github avatar rupor-github commented on June 8, 2024

July, epub processing is not main function of by fb2 to mobi converter :) It is rather rudimentary and stupid. You could simply run kindlegen.exe directly on your epubs using command line very similar to yours. However, please see if using command line switch (or config parameter) to turn off hyphenation will help with the problem. Meantime (if you are willing to share your book) I could take a look at the code.

from fb2mobi.

JulyMorning avatar JulyMorning commented on June 8, 2024

Alright, seems fair, but I've used this feature for a while with your great converter and it was pretty comfy to get all the books converted by the couple of commands with the same application – not just fb2, but some epubs too. Should I really consider to run kindlegen with the same command line? Does it support it natively? However,

when the hyphens is set to False we have this:

M:\Books>"G:\Soft\Kindle\fb2mobi\fb2mobi.exe" "M:\Books\mathesay\mathe-2016.epub"
Traceback (most recent call last):
  File "d:\python\python35\lib\site-packages\cx_freeze-5.0-py3.5-win-amd64.egg\cx_Freeze\initscripts\Console.py", line 21, in <module>
  File "fb2mobi.py", line 611, in <module>
  File "fb2mobi.py", line 407, in process
  File "E:\builds_lib\fb2mobi\modules\config.py", line 92, in __init__
  File "E:\builds_lib\fb2mobi\modules\config.py", line 95, in _load
  File "src\lxml\lxml.etree.pyx", line 3427, in lxml.etree.parse (src\lxml\lxml.etree.c:78731)
  File "src\lxml\parser.pxi", line 1782, in lxml.etree._parseDocument (src\lxml\lxml.etree.c:114432)
  File "src\lxml\parser.pxi", line 1808, in lxml.etree._parseDocumentFromURL (src\lxml\lxml.etree.c:114779)
  File "src\lxml\parser.pxi", line 1712, in lxml.etree._parseDocFromFile (src\lxml\lxml.etree.c:113691)
  File "src\lxml\parser.pxi", line 1115, in lxml.etree._BaseParser._parseDocFromFile (src\lxml\lxml.etree.c:108438)
  File "src\lxml\parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src\lxml\lxml.etree.c:101974)
  File "src\lxml\parser.pxi", line 683, in lxml.etree._handleParseResult (src\lxml\lxml.etree.c:103624)
  File "src\lxml\parser.pxi", line 613, in lxml.etree._raiseParseError (src\lxml\lxml.etree.c:102536)
lxml.etree.XMLSyntaxError: Input is not proper UTF-8, indicate encoding !
Bytes: 0x85 0x30 0x31 0x32, line 9, column 26

If you really can take a look at the book and test it, it would be really great. In the matter of fact, it isn't the first time when I get the error «'EpubProc' object has no attribute 'header'» with epubs, so it possilbly can solve lots of familiar cases. By the way, I know that there's a mobi-version on the tracker, but it's not the point really)

Also, I don't know, I just cannot convert these fb2 books with the app, although all the other books seems to convert alright.

Thanks for your reply, really great work on this useful util. I appreciate it a lot.

from fb2mobi.

Related Issues (14)

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.