You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, I expect the output file to go into the current/working directory and not in the input directory (at the same level as the input file). I understand that this is debatable and suggestive.
$ marp --theme-set themes --input-dir docs
[ INFO ] Converting 1 markdown...
[ INFO ] docs/slides.md => docs/slides.html
So if I want to be sure to control the output path I'll use the --output option which has this exact purpose.
$ marp --theme-set themes --output index.html --input-dir docs
[ INFO ] Converting 1 markdown...
[ INFO ] docs/slides.md => index.html/slides.html
The --output should be relative to the current/working directory so I expect the file index.html to go to $PWD/index.html. At list an expected bad behavior would be it still output to $PWD/docs/index.html. But here what the help message says:
$ -o, --output Output file path (or directory when
input-dir is passed) [string]
So when input-dir is provided, --output is interpreted as a directory and not a file anymore, so it outputs to index.html/slides.html. Meaning I can control the output dir but not longer the file name.
$ marp --theme-set themes --output test --input-dir docs
[ INFO ] Converting 1 markdown...
[ INFO ] docs/slides.md => test/slides.html
$ marp --theme-set themes --output test/index.html --input-dir docs
[ INFO ] Converting 1 markdown...
[ INFO ] docs/slides.md => test/index.html/slides.html
$ curl --help all | grep '\--output'
-o, --output <file> Write to file instead of stdout
--output-dir <dir> Directory to save files in
There should definitely be an --output-file and an --output-dir option with predictable behavior and not one --output option with unpredictable behavior that change relatively to other option being used.
Actual behavior
See How to reproduce
Additional information
No response
The text was updated successfully, but these errors were encountered:
--input-dir (-I) option has designed mutually exclusive to regular inputs, as indicated in the usage section of marp --help. (Perhaps CLI help may be insufficient informing users about input exclusivity)
Regular inputs and --input-dir option cannot mix, but we allow glob pattern and directories as inputs. If specified directories, Marp CLI will convert every Markdown files inside directories.
--input-dir option is mainly used for server mode (-s) to determine a "unique" root directory. In non-server mode, --input-dir means processing "directory to directory" conversion.
From the standpoint of this exclusivity, we had thought that splitting --output option into two options would be redundant.
If decided to introduce --output-dir, it is up for discussion whether it should be just an alias for the --output option corresponding to --input-dir, or whether it should be an available option also in regular input files.
Version of Marp Tool
v1.7.2
Operating System
Windows
Environment
How to reproduce
By default, I expect the output file to go into the current/working directory and not in the input directory (at the same level as the input file). I understand that this is debatable and suggestive.
So if I want to be sure to control the output path I'll use the
--output
option which has this exact purpose.The
--output
should be relative to the current/working directory so I expect the fileindex.html
to go to$PWD/index.html
. At list an expected bad behavior would be it still output to$PWD/docs/index.html
. But here what the help message says:So when
input-dir
is provided,--output
is interpreted as a directory and not a file anymore, so it outputs toindex.html/slides.html
. Meaning I can control the output dir but not longer the file name.Same context as in marp-team/marp#382
Expected behavior
eg curl has 2 options:
There should definitely be an
--output-file
and an--output-dir
option with predictable behavior and not one--output
option with unpredictable behavior that change relatively to other option being used.Actual behavior
See How to reproduce
Additional information
No response
The text was updated successfully, but these errors were encountered: