diff options
| author | 2015-08-26 07:57:23 -0300 | |
|---|---|---|
| committer | 2015-08-26 07:57:23 -0300 | |
| commit | 70ceb871117ca811d63cb02671dc0fefc2700883 (patch) | |
| tree | 846133ea39797d2cd1101cff2ac0818167353490 /nikola/plugins/compile/pandoc.py | |
| parent | 8559119e2f45b7f6508282962c0430423bfab051 (diff) | |
| parent | 787b97a4cb24330b36f11297c6d3a7a473a907d0 (diff) | |
Merge tag 'upstream/7.6.4'
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. |
