Commit f2b815a5 authored by Denis Salem's avatar Denis Salem
Browse files

missing entry content message is now more accurate

parent 4a1a05fd
......@@ -160,9 +160,9 @@
DONE | Semantic-web features.
WIP | Client-side search engine.
TODO | Theme must have it's own yaml configuration.
TODO | Open with navigator manual.
TODO | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
TODO | Add relevant templates for themes.
TODO | Open with navigator manual.
TODO | Add definition in documentation for optional fields in blog configuration.
TODO | Change nomenclature: Most of the usual patterns are changed. Fix doc.
......
......@@ -145,8 +145,8 @@ def export_blog(argv=list()):
pattern_processor = setup_pattern_processor(patterns_map)
notify("├─ "+messages.pre_process)
process_non_contextual_patterns(pattern_processor, theme)
# cleaning directory
shutil.rmtree("blog", ignore_errors=False, onerror=rm_tree_error_handler)
os.makedirs("blog")
......
......@@ -52,7 +52,7 @@ class EntryWrapper:
except IndexError:
pass
die(messages.missing_entry_content_inclusion)
die(messages.missing_entry_content_inclusion.format(filename))
class Entry:
def __init__(self, filename, paths, jsonld_callback, date_format, encoding="utf-8", ):
......
......@@ -37,7 +37,7 @@ class Theme:
self.rss_footer = ProcessedString(open(theme_folder+"chunks/rssFooter.xml",'r').read(), "rssFooter.html")
self.atom_header = ProcessedString(open(theme_folder+"chunks/atomHeader.xml",'r').read(), "atomHeader.html")
self.atom_footer = ProcessedString(open(theme_folder+"chunks/atomFooter.xml",'r').read(), "atomFooter.html")
self.entry = EntryWrapper(open(theme_folder+"chunks/entry.html",'r').read(), "entry.html")
self.rss_entry = EntryWrapper(open(theme_folder+"chunks/rssEntry.xml",'r').read(),"rssEntry.xxml")
self.atom_entry = EntryWrapper(open(theme_folder+"chunks/atomEntry.xml",'r').read(),"atomEntry.xml")
......
......@@ -74,7 +74,7 @@ class Messages:
unknown_text_editor = "{0}: unknown text editor."
theme_name = "Theme name"
entry_is_empty = "{0}: The content of the entry is empty."
missing_entry_content_inclusion = "Invalid theme. Missing entry content inclusion in entry.html and/or rssEntry.html and/or atomEntry.html"
missing_entry_content_inclusion = "Invalid theme. Missing entry content inclusion in \"chunks/{0}\""
unknown_language="Pygments: {0}: Unknown language."
pre_process="Pre-processing theme and entries..."
directory_not_copied="Directory not copied. Error: %s"
......
......@@ -72,7 +72,7 @@ class Messages:
unknown_text_editor = "{0} : Éditeur de texte inconnu."
theme_name = "Nom du thème"
entry_is_empty = "{0} : Le contenu de la publication est vide."
missing_entry_content_inclusion="Thème invalide. Il manque l'inclusion du contenu de la publication dans entry.html et/ou rssEntry.html et/ou atomEntry.html"
missing_entry_content_inclusion="Thème invalide. Il manque l'inclusion du contenu de la publication dans \"chunks/{0}\""
unknown_language="Pygments: {0} : Langage inconnu."
pre_process="Pré-traitement du théme et des publications..."
directory_not_copied="Le dossier ne peut être copié. Erreur: %s"
......
......@@ -100,7 +100,6 @@ def include_file(argv):
for arg in argv[1:]:
args["venc_arg_"+str(index)] = arg.strip()
index +=1
print(args)
return include_string.format(**args)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment