Commit 7c932b7b authored by Denis Salem's avatar Denis Salem
Browse files

fix .:GetEntryTitle recursion

parent 5f33af3c
......@@ -147,8 +147,8 @@
DONE | Speed up blog exportation (almost nine times faster!).
DONE | Escape patterns.
DONE | Chapters engine.
DONE | Fix pattern (i.e .:GetEntryTitle:.) access in template's metadata.
TODO | Fix unit test.
TODO | Fix pattern (i.e .:GetEntryTitle:.) access in template's metadata.
TODO | Open with navigator manual.
TODO | Client-side search engine.
TODO | Reorganize themes dependencies in setup (adding default templates, scripts, and pages to include).
......@@ -172,5 +172,5 @@
TODO | Add nice 404 errors page.
TODO | Improve Feed.
TODO | Print out what's going on while FTP transfert.
TODO | Fix gvim / -ex
TODO | Warn about entry title duplicates
TODO | Fix gvim / -ex.
TODO | Warn about entry title duplicates.
......@@ -73,8 +73,6 @@ def new_entry(argv):
entry["minute"] = raw_entry_date.minute
entry["date"] = raw_entry_date
entry_date = str(date.month)+'-'+str(date.day)+'-'+str(date.year)+'-'+str(date.hour)+'-'+str(date.minute)
output_filename = os.getcwd()+'/entries/'+str(entry["ID"])+"__"+entry_date+"__"+entry["title"].replace(' ','_')
......@@ -84,7 +82,7 @@ def new_entry(argv):
else:
try:
output = open(os.getcwd()+'/templates/'+argv[1], 'r').read()
output = open(os.getcwd()+'/templates/'+argv[1], 'r').read().replace(".:GetEntryTitle:.", argv[0])
except FileNotFoundError as e:
die(messages.file_not_found.format(os.getcwd()+"/templates/"+argv[1]))
......
......@@ -111,7 +111,7 @@ class Entry:
)
try:
self.title = metadata["title"]
self.title = metadata["title"].replace(".:GetEntryTitle:.",'')
except KeyError:
die(messages.missing_mandatory_field_in_entry.format("title", self.id))
......
Supports Markdown
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