forked from LiveCarta/BookConverter
change structure of docx converter
This commit is contained in:
@@ -13,8 +13,8 @@ import os
|
|||||||
import pathlib
|
import pathlib
|
||||||
from abc import abstractmethod, ABCMeta
|
from abc import abstractmethod, ABCMeta
|
||||||
|
|
||||||
from livecarta_config import LiveCartaConfig
|
from src.livecarta_config import LiveCartaConfig
|
||||||
from util.helpers import BookLogger, BookStatusWrapper
|
from src.util.helpers import BookLogger, BookStatusWrapper
|
||||||
|
|
||||||
|
|
||||||
class BookSolver:
|
class BookSolver:
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ from threading import Event
|
|||||||
import pika
|
import pika
|
||||||
|
|
||||||
from access import Access
|
from access import Access
|
||||||
from docx_solver import DocxBook
|
from src.docx_converter.docx_solver import DocxBook
|
||||||
from epub_solver import EpubBook
|
from src.epub_converter.epub_solver import EpubBook
|
||||||
|
|
||||||
|
|
||||||
def configure_file_logger(name, filename='logs/converter_log.log', filemode='w+',
|
def configure_file_logger(name, filename='logs/converter_log.log', filemode='w+',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import re
|
|||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from ebooklib.epub import Section, Link
|
from ebooklib.epub import Section, Link
|
||||||
from livecarta_config import LiveCartaConfig
|
from src.livecarta_config import LiveCartaConfig
|
||||||
|
|
||||||
"""
|
"""
|
||||||
These are data structures which form mapping from NCX to python data structures.
|
These are data structures which form mapping from NCX to python data structures.
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ from threading import Event
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from html_docx_preprocessor import HTMLDocxPreprocessor
|
from html_docx_preprocessor import HTMLDocxPreprocessor
|
||||||
from libra_html2json_converter import LibraHTML2JSONConverter
|
from libra_html2json_converter import LibraHTML2JSONConverter
|
||||||
from book_solver import BookSolver
|
|
||||||
|
from src.book_solver import BookSolver
|
||||||
|
|
||||||
|
|
||||||
class DocxBook(BookSolver):
|
class DocxBook(BookSolver):
|
||||||
@@ -7,8 +7,8 @@ from typing import List
|
|||||||
|
|
||||||
from bs4 import BeautifulSoup, NavigableString, Tag
|
from bs4 import BeautifulSoup, NavigableString, Tag
|
||||||
|
|
||||||
from livecarta_config import LiveCartaConfig
|
from src.livecarta_config import LiveCartaConfig
|
||||||
from util.helpers import BookLogger, BookStatusWrapper
|
from src.util.helpers import BookLogger, BookStatusWrapper
|
||||||
|
|
||||||
|
|
||||||
class HTMLDocxPreprocessor:
|
class HTMLDocxPreprocessor:
|
||||||
@@ -2,7 +2,7 @@ import logging
|
|||||||
import re
|
import re
|
||||||
from copy import copy
|
from copy import copy
|
||||||
|
|
||||||
from livecarta_config import LiveCartaConfig
|
from src.livecarta_config import LiveCartaConfig
|
||||||
|
|
||||||
|
|
||||||
class LibraHTML2JSONConverter:
|
class LibraHTML2JSONConverter:
|
||||||
Reference in New Issue
Block a user