diff --git a/src-py/renatoxsr/utils/pandoc.py b/src-py/renatoxsr/utils/pandoc.py index 0f8387c..886907c 100644 --- a/src-py/renatoxsr/utils/pandoc.py +++ b/src-py/renatoxsr/utils/pandoc.py @@ -15,6 +15,7 @@ def pandoc( bin: str | Path = "pandoc", output: str | Path = "-", overwrite = False, + to="markdown", ) -> str: logger.info("%s: from '%s' to '%s'", bin, input_file, output) if not Path(bin).is_file(): @@ -29,7 +30,9 @@ def pandoc( outf = Path(output) if output != "-" and outf.is_file() and not overwrite: raise FileExistsError(errno.EEXIST, os.strerror(errno.EEXIST), outf) - cmd = [bin, "--output", "-" if output=="-" else outf.resolve(), fpath] + cmd = [bin, + "--output", "-" if output=="-" else outf.resolve(), + "--writer", to, fpath] logger.debug("CMD %s", str(cmd)) proc = subprocess.run(cmd, text=True)