mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-12-18 08:27:58 +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
|
TIMEOUT = 300
|
||||||
|
|
||||||
PROGRAM = 'ebook-convert'
|
PROGRAM = 'ebook-convert'
|
||||||
ARGUMENTS = ('--no-default-epub-cover',)
|
ARGUMENTS = ('--cover', 'cover.jpg')
|
||||||
|
|
||||||
proc = partial(run, stderr=STDOUT, timeout=TIMEOUT, check=True)
|
proc = partial(run, stderr=STDOUT, timeout=TIMEOUT, check=True)
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,12 @@
|
||||||
<body>
|
<body>
|
||||||
{%- autoescape false %}
|
{%- autoescape false %}
|
||||||
{%- if authors_note_position == 'top' %}
|
{%- 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>
|
<div id='authors-note'>{{ authors_note_html }}</div>
|
||||||
<hr/>
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<h1>{{ title | e }}</h1>
|
|
||||||
<div id='content'>{{ content_html }}</div>
|
<div id='content'>{{ content_html }}</div>
|
||||||
{%- if authors_note_position == 'bottom' %}
|
{%- if authors_note_position == 'bottom' %}
|
||||||
<hr/>
|
<h2>{{ "Author's Note" | e }}</h2>
|
||||||
<h1>{{ "Author's Note" | e }}</h1>
|
|
||||||
<div id='authors-note'>{{ authors_note_html }}</div>
|
<div id='authors-note'>{{ authors_note_html }}</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endautoescape %}
|
{%- endautoescape %}
|
||||||
|
|
|
@ -30,7 +30,7 @@ from urllib.parse import unquote
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup, Tag
|
||||||
|
|
||||||
from fimfarchive.exceptions import StorySourceError
|
from fimfarchive.exceptions import StorySourceError
|
||||||
from fimfarchive.stories import Story
|
from fimfarchive.stories import Story
|
||||||
|
@ -80,6 +80,8 @@ class ImageLoader:
|
||||||
else:
|
else:
|
||||||
tag.attrs['src'] = self.fetch(url)
|
tag.attrs['src'] = self.fetch(url)
|
||||||
|
|
||||||
|
tag.wrap(Tag(name='center'))
|
||||||
|
|
||||||
return dom.decode_contents().encode()
|
return dom.decode_contents().encode()
|
||||||
|
|
||||||
def entries(self) -> Iterator[Tuple[str, bytes]]:
|
def entries(self) -> Iterator[Tuple[str, bytes]]:
|
||||||
|
|
Loading…
Reference in a new issue