From fd67ad9ed8f07e9aaa1844329dbdd1dd0d6187d2 Mon Sep 17 00:00:00 2001 From: Jaculabilis Date: Sun, 27 Aug 2017 00:27:52 -0500 Subject: [PATCH] Fix errors in phantom and stub page building --- lexipython.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lexipython.py b/lexipython.py index c4a2f19..43b0ba8 100644 --- a/lexipython.py +++ b/lexipython.py @@ -279,13 +279,12 @@ def build_phantom_page(title, cite_map, config): "
\n"\ "

Cited by: {citedby}

\n"\ "
\n".format( - cites=cites_str, citedby=citedby_str) # Fill in the entry skeleton entry_skeleton = load_resource("entry-page.html") css = load_resource("lexicon.css") return entry_skeleton.format( - title=lex["title"], + title=title, lexicon=config["LEXICON_TITLE"], css=css, logo=config["LOGO_FILENAME"], @@ -306,20 +305,21 @@ def build_stub_page(title, cite_map, config): content = "

[The handwriting is completely illegible.]

\n"\ "

Ersatz Scrivener

\n" # Build the stub citeblock - cites, citedby = citation_lists(title, cite_map) + citedby = [citer_title + for citer_title, cited_titles in cite_map.items() + if title in cited_titles] citedby_str = " | ".join([lf(None, title, title) for title in citedby]) citeblock = ""\ "
\n"\ "

Citations: [Illegible]

\n"\ "

Cited by: {citedby}

\n"\ "
\n".format( - cites=cites_str, citedby=citedby_str) # Fill in the entry skeleton entry_skeleton = load_resource("entry-page.html") css = load_resource("lexicon.css") return entry_skeleton.format( - title=lex["title"], + title=title, lexicon=config["LEXICON_TITLE"], css=css, logo=config["LOGO_FILENAME"], @@ -510,7 +510,6 @@ def command_build(argv): print "Clearing old HTML files" for filename in os.listdir("out/"): if filename[-5:] == ".html": - print filename os.remove("out/" + filename) # Write the written entries print "Writing written articles..."