31#define ARG_FORMAT "--format"
39 .default_value( std::string(
"kicadsexpr" ) )
40 .help(
UTF8STDSTR(
_(
"Netlist output format, valid options: kicadsexpr, kicadxml, "
41 "cadstar, orcadpcb2, spice, spicemodel, pads, allegro" ) ) )
48 std::unique_ptr<JOB_EXPORT_SCH_NETLIST> netJob =
49 std::make_unique<JOB_EXPORT_SCH_NETLIST>();
51 netJob->m_filename = m_argInput;
52 netJob->SetOutputPath( m_argOutput );
54 if( !wxFile::Exists( netJob->m_filename ) )
56 wxFprintf( stderr,
_(
"Schematic file does not exist or is not accessible\n" ) );
61 if( format ==
"kicadsexpr" )
65 else if( format ==
"kicadxml" )
69 else if( format ==
"cadstar" )
73 else if( format ==
"orcadpcb2" )
77 else if( format ==
"spice" )
81 else if( format ==
"spicemodel" )
85 else if( format ==
"pads" )
89 else if( format ==
"allegro" )
95 wxFprintf( stderr,
_(
"Invalid format\n" ) );
argparse::ArgumentParser m_argParser
void addCommonArgs(bool aInput, bool aOutput, bool aInputIsDir, bool aOutputIsDir)
Set up the most common of args used across cli.
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)
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)