During development, turns out, that some incompatibility has been
introduced with lxml and html5-parser binary versions on pypy, with
library which is installed on my system. In case, where incompatibility
occurs, there was no error message, no exception thrown, just as a
result of parsing, lame lxml object has been returned, and performing
method like find() on it causes returning None instead of expected
Element object.
Following information about installation of the html5-library[1], I was
forced to change how ebook-converter is installed. Now, we have to build
and compile lxml on the target system, which is forced by introduced
requirements.txt file. Perhaps, I'll reconsider removing html5-parser in
the future.
[1] https://html5-parser.readthedocs.io/en/latest/#unix
There is a module, where this function is used - formatter_functions. It
is at the same time the only place where it is used. No need to clutter
__init__.py with it.
In Calibre, there was decided to keep the fonts information inside the
configuration directory. While scanned fonts information is actually a
cache, I would keep it there. This commit is making that happen.
Also removed XMLConfig in favor of JSONConfig class, since XMLConfig is
not used at all.
There was (and perhaps it exists in other modules, need to check) a bad
habit of importing objects out of module A into B just to be able of
import those object from module B. In this case there was import from
module config_base into module config. This commit fix this.