attempt to enable bibligraphy but founder in relative file paths
This commit is contained in:
parent
2fdb5b20b2
commit
6fe6277a25
@ -64,18 +64,19 @@ class PandocReader(BaseReader):
|
||||
|
||||
bib_header = self.settings.get('PANDOC_BIBHEADER', None)
|
||||
|
||||
# filters = self.settings.get('PANDOC_FILTERS', [])
|
||||
filters = self.settings.get('PANDOC_FILTERS', [])
|
||||
extensions = self.settings.get('PANDOC_EXTENSIONS', '')
|
||||
if isinstance(extensions, list):
|
||||
extensions = ''.join(extensions)
|
||||
|
||||
|
||||
extra_args = self.settings.get('PANDOC_ARGS', [])
|
||||
extensions = self.settings.get('PANDOC_EXTENSIONS', '')
|
||||
if isinstance(extensions, list):
|
||||
extensions = ''.join(extensions)
|
||||
|
||||
pandoc_cmd = ["pandoc", "--from=markdown" + extensions, "--to=html5"]
|
||||
for filt in filters:
|
||||
pandoc_cmd.extend(["--filter", filt])
|
||||
pandoc_cmd.extend(extra_args)
|
||||
|
||||
if "bibliography" in metadata.keys():
|
||||
@ -87,9 +88,10 @@ class PandocReader(BaseReader):
|
||||
'--metadata=reference-section-title="{}"'.format(
|
||||
bib_header)]
|
||||
|
||||
proc = subprocess.Popen(pandoc_cmd,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE)
|
||||
proc = subprocess.Popen(
|
||||
pandoc_cmd,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE)
|
||||
|
||||
output = proc.communicate(content.encode('utf-8'))[0].decode('utf-8')
|
||||
status = proc.wait()
|
||||
|
Loading…
Reference in New Issue
Block a user