Is it possible to/How can I render a document-string from the commandline without creating the source doc file? #11334
Replies: 1 comment 7 replies
-
To be clear, not all configuration can be passed at command line. Some need to be passed through file, either .yml file, or in document. Also, I supposed to you are focusing on single file render, and no project.
It seems a valid workflow to temporarily create what you need.
I won't answer on this as I don't know really. I'll let others in the team answer on that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Assume I generate syntax-valid qmd-files programmatically, and then render those to output formats via the quarto commandline. That would simply be
I know that pandoc would allow me to render the file's string directly, that is without having the file itself, e.g.
I believe (but am not entirely certain right now) that all format-options which I would usually provide to quarto via a yml-file can be passed on the commandline as well.
This would mean that to my knowledge only the input-document file is strictly required to be a file, whereas everything else can be passed directly1.
Could this be implemented though? I personally think this to be somewhat odd, but I am probably not aware of some reason or implication against this.
A potential short-time hack to implement night be to write the string to file, render it via quarto and then remove it again. However, I haven't tested this yet.
Would this be possible in principal, and would it be something you consider worth implementing, or does this fall outside the scope or design for quarto?
I also think that in theory this could allow rendering the same file string to different formats in parallel, but I am not sure to what degree file access and locking would interfere here.
Thank you.
Sincerely,
~Gw
Footnotes
Ignoring dependency files like images, data- and code-files, etc... for now. ↩
Beta Was this translation helpful? Give feedback.
All reactions