Compare commits
No commits in common. "e65643280254cd4752c8fb0b3a7f693932b44bbc" and "6f1dbf407ec8ad1a098e4d9a5249e6093d223c31" have entirely different histories.
e656432802
...
6f1dbf407e
1 changed files with 0 additions and 45 deletions
45
epubfile.py
45
epubfile.py
|
|
@ -14,7 +14,6 @@ import tempfile
|
|||
import tinycss2
|
||||
import urllib.parse
|
||||
import uuid
|
||||
import warnings
|
||||
import zipfile
|
||||
|
||||
from voussoirkit import betterhelp
|
||||
|
|
@ -25,8 +24,6 @@ from voussoirkit import vlogging
|
|||
|
||||
log = vlogging.get_logger(__name__, 'epubfile')
|
||||
|
||||
warnings.filterwarnings("ignore", category=bs4.XMLParsedAsHTMLWarning)
|
||||
|
||||
HTML_LINK_PROPERTIES = {
|
||||
'a': ['href'],
|
||||
'audio': ['src'],
|
||||
|
|
@ -1506,12 +1503,6 @@ def holdit_argparse(args):
|
|||
pipeable.stdout(epub.absolute_path)
|
||||
return 0
|
||||
|
||||
def manifest_argparse(args):
|
||||
book = Epub(args.epub)
|
||||
for item in book.get_manifest_items(soup=True):
|
||||
pipeable.stdout(str(item))
|
||||
return 0
|
||||
|
||||
def merge(
|
||||
input_filepaths,
|
||||
demote_headers=False,
|
||||
|
|
@ -1627,11 +1618,6 @@ def normalize_argparse(args):
|
|||
pipeable.stdout(epub.absolute_path)
|
||||
return 0
|
||||
|
||||
def setcover_argparse(args):
|
||||
book = Epub(args.epub)
|
||||
book.set_cover_image(args.cover_id)
|
||||
return 0
|
||||
|
||||
def setfont(book, new_font, autoyes=False):
|
||||
css_id = 'epubfile_setfont'
|
||||
css_basename = 'epubfile_setfont.css'
|
||||
|
|
@ -1825,19 +1811,6 @@ def main(argv):
|
|||
|
||||
################################################################################################
|
||||
|
||||
p_manifest = subparsers.add_parser(
|
||||
'manifest',
|
||||
description='''
|
||||
Print all of the manifest entries in the book.
|
||||
''',
|
||||
)
|
||||
p_manifest.add_argument(
|
||||
'epub',
|
||||
)
|
||||
p_manifest.set_defaults(func=manifest_argparse)
|
||||
|
||||
################################################################################################
|
||||
|
||||
p_merge = subparsers.add_parser(
|
||||
'merge',
|
||||
description='''
|
||||
|
|
@ -1932,24 +1905,6 @@ def main(argv):
|
|||
|
||||
################################################################################################
|
||||
|
||||
p_setcover = subparsers.add_parser(
|
||||
'setcover',
|
||||
description='''
|
||||
Set the book's cover image to the specified manifest ID.
|
||||
|
||||
You can use the manifest command first to see what's in the book.
|
||||
''',
|
||||
)
|
||||
p_setcover.add_argument(
|
||||
'epub',
|
||||
)
|
||||
p_setcover.add_argument(
|
||||
'cover_id',
|
||||
)
|
||||
p_setcover.set_defaults(func=setcover_argparse)
|
||||
|
||||
################################################################################################
|
||||
|
||||
p_setfont = subparsers.add_parser(
|
||||
'setfont',
|
||||
description='''
|
||||
|
|
|
|||
Loading…
Reference in a new issue