Format some long lines.
This commit is contained in:
parent
e0974f87ac
commit
b14a06c1eb
2 changed files with 8 additions and 5 deletions
|
@ -98,7 +98,11 @@ class Article:
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'Article({self.md_file.absolute_path})'
|
return f'Article({self.md_file.absolute_path})'
|
||||||
|
|
||||||
ARTICLES = {file: Article(file) for file in spinal.walk_generator(writing_rootdir) if file.extension == 'md' and file.parent != writing_rootdir}
|
ARTICLES = {
|
||||||
|
file: Article(file)
|
||||||
|
for file in spinal.walk_generator(writing_rootdir)
|
||||||
|
if file.extension == 'md' and file.parent != writing_rootdir
|
||||||
|
}
|
||||||
|
|
||||||
def write_articles():
|
def write_articles():
|
||||||
for article in ARTICLES.values():
|
for article in ARTICLES.values():
|
||||||
|
|
|
@ -541,7 +541,6 @@ def markdown(
|
||||||
if do_embed_images:
|
if do_embed_images:
|
||||||
embed_images(soup, cache=image_cache)
|
embed_images(soup, cache=image_cache)
|
||||||
|
|
||||||
|
|
||||||
if return_soup:
|
if return_soup:
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
|
@ -592,8 +591,8 @@ def markdown_flask(core_filename, port, *args, **kwargs):
|
||||||
html = markdown(md=cat_file(filename), *args, **kwargs)
|
html = markdown(md=cat_file(filename), *args, **kwargs)
|
||||||
refresh = request.args.get('refresh', None)
|
refresh = request.args.get('refresh', None)
|
||||||
if refresh is not None:
|
if refresh is not None:
|
||||||
refresh = max(float(refresh), 1)
|
refresh = 1000 * max(float(refresh), 1)
|
||||||
html += f'<script>setTimeout(function(){{window.location.reload()}}, {refresh * 1000})</script>'
|
html += f'<script>setTimeout(function(){{window.location.reload()}}, {refresh})</script>'
|
||||||
return html
|
return html
|
||||||
|
|
||||||
@site.route('/')
|
@site.route('/')
|
||||||
|
|
Loading…
Reference in a new issue