29#define ARG_FORMAT "--format"
30#define ARG_UNITS "--units"
31#define ARG_CALCULATE_AREA "--area"
32#define ARG_STRICT "--strict"
43 .default_value( std::string(
"text" ) )
44 .help(
UTF8STDSTR(
_(
"Output format, options: text, json" ) ) )
48 .default_value( std::string(
"mm" ) )
49 .help(
UTF8STDSTR(
_(
"Output units, options: mm, inch, mils (default: mm)" ) ) )
53 .help(
UTF8STDSTR(
_(
"Calculate and display copper area" ) ) )
62 std::unique_ptr<JOB_GERBER_INFO> infoJob = std::make_unique<JOB_GERBER_INFO>();
70 if( format == wxS(
"text" ) )
74 else if( format == wxS(
"json" ) )
80 wxFprintf( stderr,
_(
"Invalid output format: %s\n" ), format );
86 if( units == wxS(
"mm" ) )
90 else if( units == wxS(
"inch" ) )
94 else if( units == wxS(
"mils" ) )
100 wxFprintf( stderr,
_(
"Invalid units: %s\n" ), units );
argparse::ArgumentParser m_argParser
COMMAND(const std::string &aName)
Define a new COMMAND instance.
void addCommonArgs(bool aInput, bool aOutput, IO_TYPE aInputType, IO_TYPE aOutputType)
Set up the most common of args used across cli.
wxString m_argInput
Value of the common input arg if configured.
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
int ProcessJob(KIWAY::FACE_T aFace, JOB *aJob, REPORTER *aReporter=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
#define ARG_CALCULATE_AREA
This file contains miscellaneous commonly used macros and functions.
static const int ERR_ARGS
wxString From_UTF8(const char *cstring)