32#include <wx/tokenzr.h> 
   34#define ARG_EXCLUDE_DRAWING_SHEET "--exclude-drawing-sheet" 
   35#define ARG_NO_BACKGROUND_COLOR "--no-background-color" 
   36#define ARG_PAGES "--pages" 
   37#define ARG_EXCLUDE_PDF_PROPERTY_POPUPS "--exclude-pdf-property-popups" 
   38#define ARG_EXCLUDE_PDF_HIERARCHICAL_LINKS "--exclude-pdf-hierarchical-links" 
   39#define ARG_EXCLUDE_PDF_METADATA "--exclude-pdf-metadata" 
   40#define ARG_FONT_NAME "--default-font" 
   41#define ARG_DRAW_HOP_OVER "--draw-hop-over" 
   43#define DEPRECATED_ARG_HPGL_PEN_SIZE "--pen-size" 
   44#define DEPRECATED_ARG_HPGL_ORIGIN "--origin" 
   47                                                       const std::string& aDescription,
 
   60            .default_value( std::string() )
 
   61            .help( 
UTF8STDSTR( 
_( 
"Color theme to use (will default to schematic settings)" ) ) )
 
   62            .metavar( 
"THEME_NAME" );
 
   73            .default_value( wxString( 
"" ).ToStdString() );
 
   76            .help( 
UTF8STDSTR( 
_( 
"Draw hop over at wire crossings" ) ) )
 
   82                .help( 
UTF8STDSTR( 
_( 
"Do not generate property popups in PDF" ) ) )
 
   86                .help( 
UTF8STDSTR( 
_( 
"Do not generate clickable links for hierarchical elements in PDF" ) ) )
 
   90                .help( 
UTF8STDSTR( 
_( 
"Do not generate PDF metadata from AUTHOR and SUBJECT variables" ) ) )
 
   99                .help( 
UTF8STDSTR( 
_( 
"Avoid setting a background color (regardless of theme)" ) ) )
 
  104            .default_value( std::string() )
 
  105            .help( 
UTF8STDSTR( 
_( 
"List of page numbers separated by comma to print, blank or " 
  106                                  "unspecified is equivalent to all pages" ) ) )
 
  107            .metavar( 
"PAGE_LIST" );
 
  112                .help( 
UTF8STDSTR( 
_( 
"Deprecated.  Has no effect." ) ) )
 
  114                .default_value( 0.5 )
 
  115                .metavar( 
"PEN_SIZE" );
 
  118                .help( 
UTF8STDSTR( 
_( 
"Deprecated.  Has no effect." ) ) )
 
  121                .metavar( 
"ORIGIN" );
 
 
  130        wxFprintf( stderr, 
_( 
"Plotting to HPGL is no longer supported as of KiCad 10.0.\n" ) );
 
  136    if( !wxFile::Exists( filename ) )
 
  138        wxFprintf( stderr, 
_( 
"Schematic file does not exist or is not accessible\n" ) );
 
  142    std::vector<wxString> pages;
 
  144    wxStringTokenizer     tokenizer( pagesStr, 
",", wxTOKEN_STRTOK );
 
  146    while( tokenizer.HasMoreTokens() )
 
  147        pages.push_back( tokenizer.GetNextToken().Trim( 
true ).Trim( 
false ) );
 
  149    std::unique_ptr<JOB_EXPORT_SCH_PLOT> plotJob;
 
  160    plotJob->m_filename = filename;
 
  162    plotJob->m_plotPages = pages;
 
  180    plotJob->m_plotAll = plotJob->m_plotPages.size() == 0;
 
 
void addCommonArgs(bool aInput, bool aOutput, bool aInputCanBeDir, bool aOutputIsDir)
Set up the most common of args used across cli.
 
std::map< wxString, wxString > m_argDefineVars
Value of the drawing sheet arg if configured.
 
argparse::ArgumentParser m_argParser
 
COMMAND(const std::string &aName)
Define a new COMMAND instance.
 
void addDefineArg()
Set up the drawing sheet arg used by many of the export commands.
 
wxString m_argDrawingSheet
Value of the drawing sheet arg if configured.
 
wxString m_argOutput
Value of the output arg if configured.
 
wxString m_argInput
Value of the common input arg if configured.
 
void addDrawingSheetArg()
Set up the drawing sheet arg used by many of the export commands.
 
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.
 
SCH_EXPORT_PLOT_COMMAND(const std::string &aName, const std::string &aDescription, SCH_PLOT_FORMAT aPlotFormat, bool aOutputIsDir=true)
 
SCH_PLOT_FORMAT m_plotFormat
 
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_BLACKANDWHITE_DESC
 
#define ARG_BLACKANDWHITE
 
#define ARG_EXCLUDE_DRAWING_SHEET
 
#define ARG_EXCLUDE_PDF_PROPERTY_POPUPS
 
#define ARG_NO_BACKGROUND_COLOR
 
#define DEPRECATED_ARG_HPGL_ORIGIN
 
#define ARG_EXCLUDE_PDF_HIERARCHICAL_LINKS
 
#define ARG_DRAW_HOP_OVER
 
#define DEPRECATED_ARG_HPGL_PEN_SIZE
 
#define ARG_EXCLUDE_PDF_METADATA
 
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)