The new Kicad 9 cli that can render the board, does not accept negative values as shown in this example. For me only positive values work.
Which OS, which shell?
You may need to call it like this:
\'-45,0,45\'
or
"'-45,0,45'"
Ubuntu, zsh. Indeed, protecting it twice worked here, thanks.
But it’s weird. It should work with a single quotation mark or, actually, with double quotes since a minus sign doesn’t need to be escaped. This smells like a KiCad issue.
It’s due to the “argparse” library we use.
If it receives -something
, it thinks it’s an another argument and throws an error.
While with '-something'
we get a string, then unquote and parse it ourselves.
Ok, that makes sense, however, it seems it is doing something dumb.
It is not a flag called -45
it is the flag --rotate
followed by the data for the --rotate
flag.
If I put kicad-cli pcb render -45,0,0
this is an error.
However, if I put kicad-cli pcb render --rotate -45,0,0
it should not be. It should not need quotes either.
I cannot even split the command line with \ and spaces or tabs starting each line, it seems that something does not work.
It should be a normal command line. But it looks like it has to be written exactly as it was coded.
Another thing that drives people crazy.
What is the input file?
You should at least say kicad_pcb
or kicad_sch
… even tho, I think it should accept any of the Kicad files like kicad_sch, kicad_pcb, and kicad_pro
, since each tool knows what they want… if it cannot derive and find it from the given file, it should finish with an error.
Works for me on Linux Mint + bash.
You can report other issues on GitLab.
Indeed, I was giving a duplicated flag and it was complaining and the message was hidden in the help message.
It should just give the error/warning message.
Printing the help when something fails is horrible.
And also, failing with duolicated flags is annoying. It should override it with the last one given.