From 0c4dfdec5b55b6064dccc38bbfb0a7c0699c895a Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Thu, 30 May 2013 17:41:06 -0300 Subject: Imported Upstream version 5.4.4 --- nikola/plugins/compile_wiki.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'nikola/plugins/compile_wiki.py') diff --git a/nikola/plugins/compile_wiki.py b/nikola/plugins/compile_wiki.py index 1215506..fb9e010 100644 --- a/nikola/plugins/compile_wiki.py +++ b/nikola/plugins/compile_wiki.py @@ -57,14 +57,16 @@ class CompileTextile(PageCompiler): output = HtmlEmitter(document).emit() out_file.write(output) - def create_post(self, path, onefile=False, title="", slug="", date="", - tags=""): + def create_post(self, path, onefile=False, **kw): + metadata = {} + metadata.update(self.default_metadata) + metadata.update(kw) + d_name = os.path.dirname(path) + if not os.path.isdir(d_name): + os.makedirs(os.path.dirname(path)) if onefile: raise Exception('There are no comments in CreoleWiki markup, so ' 'one-file format is not possible, use the -2 ' 'option.') - d_name = os.path.dirname(path) - if not os.path.isdir(d_name): - os.makedirs(os.path.dirname(path)) with codecs.open(path, "wb+", "utf8") as fd: fd.write("Write your post here.") -- cgit v1.2.3