forked from LiveCarta/BookConverter
rewrite imports
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import re
|
||||
import cssutils
|
||||
from typing import List
|
||||
|
||||
import cssutils
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
from ebooklib import epub
|
||||
from logging import CRITICAL
|
||||
from bs4 import BeautifulSoup
|
||||
from premailer import transform
|
||||
from itertools import takewhile
|
||||
from logging import CRITICAL
|
||||
|
||||
from src.livecarta_config import LiveCartaConfig
|
||||
from src.util.color_reader import str2hex
|
||||
|
||||
|
||||
cssutils.log.setLevel(CRITICAL)
|
||||
|
||||
sizes_pr = [-1, 0.5, 0.56, 0.63, 0.69, 0.75, 0.81, 0.88, 0.94, 1.0, 1.06, 1.13, 1.19, 1.25, 1.31, 1.38, 1.44, 1.5, 1.56,
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
import codecs
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
from os.path import dirname, normpath, join
|
||||
import json
|
||||
import codecs
|
||||
import logging
|
||||
from itertools import chain
|
||||
from collections import defaultdict
|
||||
from typing import Dict, Union, List
|
||||
from itertools import chain
|
||||
from os.path import dirname, normpath, join
|
||||
|
||||
import ebooklib
|
||||
from bs4 import BeautifulSoup, Tag
|
||||
from ebooklib import epub
|
||||
from bs4 import BeautifulSoup, Tag
|
||||
from ebooklib.epub import Link, Section
|
||||
|
||||
from src.util.helpers import BookLogger
|
||||
from src.livecarta_config import LiveCartaConfig
|
||||
from src.data_objects import ChapterItem, NavPoint
|
||||
from src.epub_converter.css_reader import build_css_content, convert_html_soup_with_css_style
|
||||
from src.epub_converter.html_epub_preprocessor import unwrap_structural_tags, get_tags_between_chapter_marks, prepare_title_and_content, \
|
||||
update_src_links_in_images, preprocess_footnotes
|
||||
from src.epub_converter.css_reader import build_css_content, convert_html_soup_with_css_style
|
||||
from src.livecarta_config import LiveCartaConfig
|
||||
from src.util.helpers import BookLogger
|
||||
|
||||
|
||||
|
||||
class EpubConverter:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from src.epub_converter.epub_converter import EpubConverter
|
||||
from src.book_solver import BookSolver
|
||||
from src.epub_converter.epub_converter import EpubConverter
|
||||
|
||||
class EpubBook(BookSolver):
|
||||
|
||||
@@ -12,5 +12,4 @@ class EpubBook(BookSolver):
|
||||
json_converter = EpubConverter(self.file_path, access=self.access, logger=self.logger_object)
|
||||
content_dict = json_converter.convert_to_dict()
|
||||
self.status_wrapper.set_generating()
|
||||
return content_dict
|
||||
|
||||
return content_dict
|
||||
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import pathlib
|
||||
from typing import Tuple
|
||||
|
||||
from bs4 import BeautifulSoup, NavigableString, Tag, Comment
|
||||
|
||||
Reference in New Issue
Block a user