diff --git a/fimfarchive/converters/fpub_epub.py b/fimfarchive/converters/fpub_epub.py index 3e78c85..98ad1f4 100644 --- a/fimfarchive/converters/fpub_epub.py +++ b/fimfarchive/converters/fpub_epub.py @@ -46,7 +46,7 @@ TARGET = 'target.epub' TIMEOUT = 300 PROGRAM = 'ebook-convert' -ARGUMENTS = ('--no-default-epub-cover',) +ARGUMENTS = ('--cover', 'cover.jpg') proc = partial(run, stderr=STDOUT, timeout=TIMEOUT, check=True) diff --git a/fimfarchive/converters/json_fpub/chapter.html b/fimfarchive/converters/json_fpub/chapter.html index 1133926..00b45a4 100644 --- a/fimfarchive/converters/json_fpub/chapter.html +++ b/fimfarchive/converters/json_fpub/chapter.html @@ -8,15 +8,12 @@ {%- autoescape false %} {%- if authors_note_position == 'top' %} -

{{ "Author's Note" | e }}

+

{{ "Author's Note" | e }}

{{ authors_note_html }}
-
{%- endif %} -

{{ title | e }}

{{ content_html }}
{%- if authors_note_position == 'bottom' %} -
-

{{ "Author's Note" | e }}

+

{{ "Author's Note" | e }}

{{ authors_note_html }}
{%- endif %} {%- endautoescape %} diff --git a/fimfarchive/converters/web_local.py b/fimfarchive/converters/web_local.py index 6f25a76..a8478b1 100644 --- a/fimfarchive/converters/web_local.py +++ b/fimfarchive/converters/web_local.py @@ -30,7 +30,7 @@ from urllib.parse import unquote from zipfile import ZipFile import requests -from bs4 import BeautifulSoup +from bs4 import BeautifulSoup, Tag from fimfarchive.exceptions import StorySourceError from fimfarchive.stories import Story @@ -80,6 +80,8 @@ class ImageLoader: else: tag.attrs['src'] = self.fetch(url) + tag.wrap(Tag(name='center')) + return dom.decode_contents().encode() def entries(self) -> Iterator[Tuple[str, bytes]]: