31#define ARG_FORMAT "--format"
40 .default_value( std::string(
"kicadsexpr" ) )
41 .help(
UTF8STDSTR(
_(
"Netlist output format, valid options: kicadsexpr, kicadxml, "
42 "cadstar, orcadpcb2, spice, spicemodel, pads, allegro" ) ) )
49 std::unique_ptr<JOB_EXPORT_SCH_NETLIST> netJob =
50 std::make_unique<JOB_EXPORT_SCH_NETLIST>();
56 if( !wxFile::Exists( netJob->m_filename ) )
58 wxFprintf( stderr,
_(
"Schematic file does not exist or is not accessible\n" ) );
63 if( format ==
"kicadsexpr" )
67 else if( format ==
"kicadxml" )
71 else if( format ==
"cadstar" )
75 else if( format ==
"orcadpcb2" )
79 else if( format ==
"spice" )
83 else if( format ==
"spicemodel" )
87 else if( format ==
"pads" )
91 else if( format ==
"allegro" )
97 wxFprintf( stderr,
_(
"Invalid format\n" ) );
void addCommonArgs(bool aInput, bool aOutput, bool aInputCanBeDir, bool aOutputIsDir)
Set up the most common of args used across cli.
void addVariantsArg()
Set up the list of variants to output arguement.
argparse::ArgumentParser m_argParser
COMMAND(const std::string &aName)
Define a new COMMAND instance.
wxString m_argOutput
Value of the output arg if configured.
wxString m_argInput
Value of the common input arg if configured.
std::vector< wxString > m_argVariantNames
The list of variant names to output.
SCH_EXPORT_NETLIST_COMMAND()
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)
This file contains miscellaneous commonly used macros and functions.
static const int ERR_ARGS
static const int ERR_INVALID_INPUT_FILE
wxString From_UTF8(const char *cstring)