mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-02-22 10:05:47 +01:00
Convert calibre modules to ebook_converter.
Here is the first batch of modules, which are needed for converting several formats to LRF. Some of the logic has been change, more cleanups will follow.
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
@@ -219,11 +219,11 @@ static struct PyModuleDef cPalmdoc_module = {
|
||||
/* m_clear */ 0,
|
||||
/* m_free */ 0,
|
||||
};
|
||||
CALIBRE_MODINIT_FUNC PyInit_cPalmdoc(void) {
|
||||
PyObject* PyInit_cPalmdoc(void) {
|
||||
#else
|
||||
#define INITERROR return
|
||||
#define INITMODULE Py_InitModule3("cPalmdoc", cPalmdoc_methods, cPalmdoc_doc)
|
||||
CALIBRE_MODINIT_FUNC initcPalmdoc(void) {
|
||||
PyObject* initcPalmdoc(void) {
|
||||
#endif
|
||||
|
||||
PyObject *m;
|
||||
|
||||
@@ -8,12 +8,13 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
import io
|
||||
from struct import pack
|
||||
|
||||
from calibre.constants import plugins
|
||||
from polyglot.builtins import range
|
||||
cPalmdoc = plugins['cPalmdoc'][0]
|
||||
if not cPalmdoc:
|
||||
raise RuntimeError(('Failed to load required cPalmdoc module: '
|
||||
'%s')%plugins['cPalmdoc'][1])
|
||||
from ebook_converter.constants import plugins
|
||||
from ebook_converter.ebooks.compression import cPalmdoc
|
||||
from ebook_converter.polyglot.builtins import range
|
||||
#cPalmdoc = plugins['cPalmdoc'][0]
|
||||
#if not cPalmdoc:
|
||||
# raise RuntimeError(('Failed to load required cPalmdoc module: '
|
||||
# '%s')%plugins['cPalmdoc'][1])
|
||||
|
||||
|
||||
def decompress_doc(data):
|
||||
|
||||
Reference in New Issue
Block a user