Format some long lines.

master
Ethan Dalool 2020-03-19 12:15:45 -07:00
parent e0974f87ac
commit b14a06c1eb
2 changed files with 8 additions and 5 deletions

View File

@ -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():
@ -298,4 +302,4 @@ complete_tag_index = Index()
all_tags = set(P.get_tags()) all_tags = set(P.get_tags())
permute(tuple(), all_tags) permute(tuple(), all_tags)
write_tag_pages() write_tag_pages()
write_writing_index() write_writing_index()

View File

@ -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('/')