From a481bb68fe9742d95ca5ab0f8ee7505578350524 Mon Sep 17 00:00:00 2001 From: Renato Rosa Date: Sat, 26 Sep 2026 15:19:09 -0300 Subject: [PATCH] Atualizar src-py/renatoxsr/utils/pandoc.py --- src-py/renatoxsr/utils/pandoc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)