diff options
| author | 2015-08-26 07:57:04 -0300 | |
|---|---|---|
| committer | 2015-08-26 07:57:04 -0300 | |
| commit | 8041475aab2b8efad7d2857027331bd626d26312 (patch) | |
| tree | 3980e1763c067079a4cebb425d642ca9eac834bf /nikola/plugins/compile/pandoc.py | |
| parent | b0b24795b24ee6809397fbbadf42f31f310a219f (diff) | |
Imported Upstream version 7.6.4
Diffstat (limited to 'nikola/plugins/compile/pandoc.py')
| -rw-r--r-- | nikola/plugins/compile/pandoc.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nikola/plugins/compile/pandoc.py b/nikola/plugins/compile/pandoc.py index 361f158..3030626 100644 --- a/nikola/plugins/compile/pandoc.py +++ b/nikola/plugins/compile/pandoc.py @@ -27,7 +27,6 @@ """Implementation of compile_html based on pandoc. You will need, of course, to install pandoc - """ from __future__ import unicode_literals @@ -41,16 +40,19 @@ from nikola.utils import req_missing, makedirs, write_metadata class CompilePandoc(PageCompiler): + """Compile markups into HTML using pandoc.""" name = "pandoc" friendly_name = "pandoc" def set_site(self, site): + """Set Nikola site.""" self.config_dependencies = [str(site.config['PANDOC_OPTIONS'])] super(CompilePandoc, self).set_site(site) def compile_html(self, source, dest, is_two_file=True): + """Compile source file into HTML and save as dest.""" makedirs(os.path.dirname(dest)) try: subprocess.check_call(['pandoc', '-o', dest, source] + self.site.config['PANDOC_OPTIONS']) @@ -59,6 +61,7 @@ class CompilePandoc(PageCompiler): req_missing(['pandoc'], 'build this site (compile with pandoc)', python=False) def create_post(self, path, **kw): + """Create a new post.""" content = kw.pop('content', None) onefile = kw.pop('onefile', False) # is_page is not used by create_post as of now. |
