christianvoigt / argdown

a simple syntax for complex argumentation
https://argdown.org
918 stars 30 forks source link

Set output folder in config.js #348

Open dhicks opened 2 years ago

dhicks commented 2 years ago

I'm learning my way around the configuration files, and having some trouble setting the output folder.

Here's a minimal argdown file test.argdown:

[foo]: foo!
    +> [bar]: barrr

What I'd like to do is generate a PDF and place it at foo/test.pdf. Here's an attempt at an argdown.config.js file to do that:

module.exports = {
    processes: {
        pdf: {
            process: "export-pdf",
            outputPath: "foo"
        }
    }
}

But when I run argdown run pdf test.argdown --cfg argdown.config.js it instead creates foo.pdf in the working directory. I suppose outputPath: "foo/test.pdf" works. But I don't want to hardcode the basename, because eventually I want to use this as an Rmarkdown/Quarto engine that works with programmatically-generated tempfiles.

Edit: It turns out the command line doesn't recognize ad files as argdown files.