Flip the include/exclude of refdes and value in cli

This commit is contained in:
Marek Roszko 2023-01-08 22:53:08 -05:00
parent 9f71e9af03
commit 684941e4b6
4 changed files with 21 additions and 23 deletions

View File

@ -33,8 +33,8 @@ namespace CLI
#define ARG_BLACKANDWHITE_DESC "Black and white only"
#define ARG_LAYERS "--layers"
#define ARG_INCLUDE_REFDES "--include-refdes"
#define ARG_INCLUDE_VALUE "--include-value"
#define ARG_EXCLUDE_REFDES "--exclude-refdes"
#define ARG_EXCLUDE_VALUE "--exclude-value"
#define ARG_THEME "--theme"
#define ARG_INCLUDE_BORDER_TITLE "--include-border-title"

View File

@ -30,9 +30,6 @@
#include <locale_io.h>
#define ARG_LAYERS "--layers"
#define ARG_INCLUDE_REFDES "--include-refdes"
#define ARG_INCLUDE_VALUE "--include-value"
#define ARG_USE_CONTOURS "--use-contours"
#define ARG_OUTPUT_UNITS "--output-units"
@ -40,13 +37,13 @@ CLI::EXPORT_PCB_DXF_COMMAND::EXPORT_PCB_DXF_COMMAND() : EXPORT_PCB_BASE_COMMAND(
{
addLayerArg( true );
m_argParser.add_argument( "-ird", ARG_INCLUDE_REFDES )
.help( UTF8STDSTR( _( "Include the reference designator text" ) ) )
m_argParser.add_argument( "-erd", ARG_EXCLUDE_REFDES )
.help( UTF8STDSTR( _( "Exclude the reference designator text" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( "-iv", ARG_INCLUDE_VALUE )
.help( UTF8STDSTR( _( "Include the value text" ) ) )
m_argParser.add_argument( "-iv", ARG_EXCLUDE_VALUE )
.help( UTF8STDSTR( _( "Exclude the value text" ) ) )
.implicit_value( true )
.default_value( false );
@ -78,8 +75,8 @@ int CLI::EXPORT_PCB_DXF_COMMAND::doPerform( KIWAY& aKiway )
return EXIT_CODES::ERR_INVALID_INPUT_FILE;
}
dxfJob->m_plotFootprintValues = m_argParser.get<bool>( ARG_INCLUDE_VALUE );
dxfJob->m_plotRefDes = m_argParser.get<bool>( ARG_INCLUDE_VALUE );
dxfJob->m_plotFootprintValues = m_argParser.get<bool>( ARG_EXCLUDE_VALUE );
dxfJob->m_plotRefDes = !m_argParser.get<bool>( ARG_EXCLUDE_REFDES );
dxfJob->m_plotGraphicItemsUsingContours = m_argParser.get<bool>( ARG_USE_CONTOURS );
wxString units = FROM_UTF8( m_argParser.get<std::string>( ARG_OUTPUT_UNITS ).c_str() );

View File

@ -36,13 +36,13 @@ CLI::EXPORT_PCB_GERBER_COMMAND::EXPORT_PCB_GERBER_COMMAND( const std::string& aN
{
addLayerArg( true );
m_argParser.add_argument( "-ird", ARG_INCLUDE_REFDES )
.help( UTF8STDSTR( _( "Include the reference designator text" ) ) )
m_argParser.add_argument( "-erd", ARG_EXCLUDE_REFDES )
.help( UTF8STDSTR( _( "Exclude the reference designator text" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( "-iv", ARG_INCLUDE_VALUE )
.help( UTF8STDSTR( _( "Include the value text" ) ) )
m_argParser.add_argument( "-ev", ARG_EXCLUDE_VALUE )
.help( UTF8STDSTR( _( "Exclude the value text" ) ) )
.implicit_value( true )
.default_value( false );
@ -88,8 +88,8 @@ int CLI::EXPORT_PCB_GERBER_COMMAND::populateJob( JOB_EXPORT_PCB_GERBER* aJob )
aJob->m_filename = FROM_UTF8( m_argParser.get<std::string>( ARG_INPUT ).c_str() );
aJob->m_outputFile = FROM_UTF8( m_argParser.get<std::string>( ARG_OUTPUT ).c_str() );
aJob->m_plotFootprintValues = m_argParser.get<bool>( ARG_INCLUDE_VALUE );
aJob->m_plotRefDes = m_argParser.get<bool>( ARG_INCLUDE_VALUE );
aJob->m_plotFootprintValues = !m_argParser.get<bool>( ARG_EXCLUDE_VALUE );
aJob->m_plotRefDes = !m_argParser.get<bool>( ARG_EXCLUDE_REFDES );
aJob->m_plotBorderTitleBlocks = m_argParser.get<bool>( ARG_INCLUDE_BORDER_TITLE );
aJob->m_disableApertureMacros = m_argParser.get<bool>( ARG_DISABLE_APERTURE_MACROS );
aJob->m_subtractSolderMaskFromSilk = m_argParser.get<bool>( ARG_SUBTRACT_SOLDERMASK );

View File

@ -35,13 +35,13 @@ CLI::EXPORT_PCB_PDF_COMMAND::EXPORT_PCB_PDF_COMMAND() : EXPORT_PCB_BASE_COMMAND(
{
addLayerArg( true );
m_argParser.add_argument( "-ird", ARG_INCLUDE_REFDES )
.help( UTF8STDSTR( _( "Include the reference designator text" ) ) )
m_argParser.add_argument( "-erd", ARG_EXCLUDE_REFDES )
.help( UTF8STDSTR( _( "Exclude the reference designator text" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( "-iv", ARG_INCLUDE_VALUE )
.help( UTF8STDSTR( _( "Include the value text" ) ) )
m_argParser.add_argument( "-ev", ARG_EXCLUDE_VALUE )
.help( UTF8STDSTR( _( "Exclude the value text" ) ) )
.implicit_value( true )
.default_value( false );
@ -79,8 +79,9 @@ int CLI::EXPORT_PCB_PDF_COMMAND::doPerform( KIWAY& aKiway )
return EXIT_CODES::ERR_INVALID_INPUT_FILE;
}
pdfJob->m_plotFootprintValues = m_argParser.get<bool>( ARG_INCLUDE_VALUE );
pdfJob->m_plotRefDes = m_argParser.get<bool>( ARG_INCLUDE_REFDES );
pdfJob->m_plotFootprintValues = !m_argParser.get<bool>( ARG_EXCLUDE_VALUE );
pdfJob->m_plotRefDes = !m_argParser.get<bool>( ARG_EXCLUDE_REFDES );
pdfJob->m_plotBorderTitleBlocks = m_argParser.get<bool>( ARG_INCLUDE_BORDER_TITLE );
pdfJob->m_printMaskLayer = m_selectedLayers;