mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-23 22:07:59 +01:00
Adjust for enchanted library stories
This commit is contained in:
parent
b39c916da3
commit
ef541b799f
3 changed files with 6 additions and 7 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -8,15 +8,12 @@
|
|||
<body>
|
||||
{%- autoescape false %}
|
||||
{%- if authors_note_position == 'top' %}
|
||||
<h1>{{ "Author's Note" | e }}</h1>
|
||||
<h2>{{ "Author's Note" | e }}</h2>
|
||||
<div id='authors-note'>{{ authors_note_html }}</div>
|
||||
<hr/>
|
||||
{%- endif %}
|
||||
<h1>{{ title | e }}</h1>
|
||||
<div id='content'>{{ content_html }}</div>
|
||||
{%- if authors_note_position == 'bottom' %}
|
||||
<hr/>
|
||||
<h1>{{ "Author's Note" | e }}</h1>
|
||||
<h2>{{ "Author's Note" | e }}</h2>
|
||||
<div id='authors-note'>{{ authors_note_html }}</div>
|
||||
{%- endif %}
|
||||
{%- endautoescape %}
|
||||
|
|
|
@ -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]]:
|
||||
|
|
Loading…
Reference in a new issue