From aa0df6aaa40631bc5e079915e912a4183fa0870e Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 31 Aug 2023 22:17:14 -0400 Subject: [PATCH] Fill in more descriptions --- kicad/cli/command_fp_export.h | 5 ++++- kicad/cli/command_pcb_export.h | 6 +++++- kicad/cli/command_pcb_export_3d.cpp | 4 +++- kicad/cli/command_pcb_export_3d.h | 3 ++- kicad/cli/command_sch_export.h | 6 +++++- kicad/cli/command_sch_export_bom.cpp | 1 + kicad/cli/command_sch_export_netlist.cpp | 1 + kicad/cli/command_sch_export_plot.cpp | 3 +++ kicad/cli/command_sch_export_plot.h | 4 +++- kicad/cli/command_sym_export.h | 6 +++++- kicad/kicad_cli.cpp | 16 ++++++++-------- 11 files changed, 40 insertions(+), 15 deletions(-) diff --git a/kicad/cli/command_fp_export.h b/kicad/cli/command_fp_export.h index 5ffe9858f8..aab5e8b5e0 100644 --- a/kicad/cli/command_fp_export.h +++ b/kicad/cli/command_fp_export.h @@ -27,7 +27,10 @@ namespace CLI { struct FP_EXPORT_COMMAND : public COMMAND { - FP_EXPORT_COMMAND() : COMMAND( "export" ) {} + FP_EXPORT_COMMAND() : COMMAND( "export" ) + { + m_argParser.add_description( UTF8STDSTR( _( "Export utilities (svg)" ) ) ); + } }; } diff --git a/kicad/cli/command_pcb_export.h b/kicad/cli/command_pcb_export.h index 5aaea25a50..a7a6a86e3a 100644 --- a/kicad/cli/command_pcb_export.h +++ b/kicad/cli/command_pcb_export.h @@ -27,7 +27,11 @@ namespace CLI { struct PCB_EXPORT_COMMAND : public COMMAND { - PCB_EXPORT_COMMAND() : COMMAND( "export" ) {} + PCB_EXPORT_COMMAND() : COMMAND( "export" ) + { + m_argParser.add_description( + UTF8STDSTR( _( "Export utilities (gerbers, drill, position files, etc)" ) ) ); + } }; } diff --git a/kicad/cli/command_pcb_export_3d.cpp b/kicad/cli/command_pcb_export_3d.cpp index fc02d708a2..44d85bfb01 100644 --- a/kicad/cli/command_pcb_export_3d.cpp +++ b/kicad/cli/command_pcb_export_3d.cpp @@ -47,11 +47,13 @@ #define REGEX_DELIMITER "(?:[\\s]*x)" #define REGEX_UNIT "([m]{2}|(?:in))" -CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aName, +CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aName, + const std::string& aDescription, JOB_EXPORT_PCB_3D::FORMAT aFormat ) : COMMAND( aName ), m_format( aFormat ) { + m_argParser.add_description( aDescription ); addCommonArgs( true, true, false ); addDefineArg(); diff --git a/kicad/cli/command_pcb_export_3d.h b/kicad/cli/command_pcb_export_3d.h index cb7957d44c..ea3c2fdd0e 100644 --- a/kicad/cli/command_pcb_export_3d.h +++ b/kicad/cli/command_pcb_export_3d.h @@ -28,7 +28,8 @@ namespace CLI { struct PCB_EXPORT_3D_COMMAND : public COMMAND { - PCB_EXPORT_3D_COMMAND( const std::string& aName, + PCB_EXPORT_3D_COMMAND( const std::string& aName, + const std::string& aDescription, JOB_EXPORT_PCB_3D::FORMAT aFormat = JOB_EXPORT_PCB_3D::FORMAT::UNKNOWN ); protected: diff --git a/kicad/cli/command_sch_export.h b/kicad/cli/command_sch_export.h index f4c439bfc4..ce7e01aa37 100644 --- a/kicad/cli/command_sch_export.h +++ b/kicad/cli/command_sch_export.h @@ -27,7 +27,11 @@ namespace CLI { struct SCH_EXPORT_COMMAND : public COMMAND { - SCH_EXPORT_COMMAND() : COMMAND( "export" ) {} + SCH_EXPORT_COMMAND() : COMMAND( "export" ) + { + m_argParser.add_description( + UTF8STDSTR( _( "Export utilities (netlist, pdf, bom, etc)" ) ) ); + } }; } diff --git a/kicad/cli/command_sch_export_bom.cpp b/kicad/cli/command_sch_export_bom.cpp index 55ca3e8cd8..5325abc9f5 100644 --- a/kicad/cli/command_sch_export_bom.cpp +++ b/kicad/cli/command_sch_export_bom.cpp @@ -31,6 +31,7 @@ CLI::SCH_EXPORT_BOM_COMMAND::SCH_EXPORT_BOM_COMMAND() : COMMAND( "bom" ) { + m_argParser.add_description( UTF8STDSTR( _( "Generate a Bill of Material (BOM)" ) ) ); addCommonArgs( true, true, false ); // Field output options diff --git a/kicad/cli/command_sch_export_netlist.cpp b/kicad/cli/command_sch_export_netlist.cpp index 808f992cbb..f2bcf1bba7 100644 --- a/kicad/cli/command_sch_export_netlist.cpp +++ b/kicad/cli/command_sch_export_netlist.cpp @@ -31,6 +31,7 @@ CLI::SCH_EXPORT_NETLIST_COMMAND::SCH_EXPORT_NETLIST_COMMAND() : COMMAND( "netlist" ) { + m_argParser.add_description( UTF8STDSTR( _( "Export a Netlist" ) ) ); addCommonArgs( true, true, false ); m_argParser.add_argument( ARG_FORMAT ) diff --git a/kicad/cli/command_sch_export_plot.cpp b/kicad/cli/command_sch_export_plot.cpp index 0875aa8403..5a9d5f137f 100644 --- a/kicad/cli/command_sch_export_plot.cpp +++ b/kicad/cli/command_sch_export_plot.cpp @@ -41,11 +41,14 @@ const HPGL_PLOT_ORIGIN_AND_UNITS hpgl_origin_ops[4] = { }; CLI::SCH_EXPORT_PLOT_COMMAND::SCH_EXPORT_PLOT_COMMAND( const std::string& aName, + const std::string& aDescription, PLOT_FORMAT aPlotFormat, bool aOutputIsDir ) : COMMAND( aName ), m_plotFormat( aPlotFormat ) { + m_argParser.add_description( aDescription ); + addCommonArgs( true, true, aOutputIsDir ); addDrawingSheetArg(); addDefineArg(); diff --git a/kicad/cli/command_sch_export_plot.h b/kicad/cli/command_sch_export_plot.h index 35f04cee93..67b0793085 100644 --- a/kicad/cli/command_sch_export_plot.h +++ b/kicad/cli/command_sch_export_plot.h @@ -29,7 +29,9 @@ namespace CLI class SCH_EXPORT_PLOT_COMMAND : public COMMAND { public: - SCH_EXPORT_PLOT_COMMAND( const std::string& aName, PLOT_FORMAT aPlotFormat, + SCH_EXPORT_PLOT_COMMAND( const std::string& aName, + const std::string& aDescription, + PLOT_FORMAT aPlotFormat, bool aOutputIsDir = true ); PLOT_FORMAT m_plotFormat; diff --git a/kicad/cli/command_sym_export.h b/kicad/cli/command_sym_export.h index d50d1c6dd6..68966867c3 100644 --- a/kicad/cli/command_sym_export.h +++ b/kicad/cli/command_sym_export.h @@ -27,7 +27,11 @@ namespace CLI { struct SYM_EXPORT_COMMAND : public COMMAND { - SYM_EXPORT_COMMAND() : COMMAND( "export" ) {} + SYM_EXPORT_COMMAND() : COMMAND( "export" ) + { + m_argParser.add_description( + UTF8STDSTR( _( "Export utilities (svg)" ) ) ); + } }; } diff --git a/kicad/kicad_cli.cpp b/kicad/kicad_cli.cpp index f8f4fff4eb..5b3a0f2879 100644 --- a/kicad/kicad_cli.cpp +++ b/kicad/kicad_cli.cpp @@ -130,9 +130,9 @@ static CLI::PCB_COMMAND pcbCmd{}; static CLI::PCB_DRC_COMMAND pcbDrcCmd{}; static CLI::PCB_EXPORT_DRILL_COMMAND exportPcbDrillCmd{}; static CLI::PCB_EXPORT_DXF_COMMAND exportPcbDxfCmd{}; -static CLI::PCB_EXPORT_3D_COMMAND exportPcbGlbCmd{ "glb", JOB_EXPORT_PCB_3D::FORMAT::GLB }; -static CLI::PCB_EXPORT_3D_COMMAND exportPcbStepCmd{ "step", JOB_EXPORT_PCB_3D::FORMAT::STEP }; -static CLI::PCB_EXPORT_3D_COMMAND exportPcbVrmlCmd{ "vrml", JOB_EXPORT_PCB_3D::FORMAT::VRML }; +static CLI::PCB_EXPORT_3D_COMMAND exportPcbGlbCmd{ "glb", UTF8STDSTR( _( "Export GLB (binary GLTF)" ) ), JOB_EXPORT_PCB_3D::FORMAT::GLB }; +static CLI::PCB_EXPORT_3D_COMMAND exportPcbStepCmd{ "step", UTF8STDSTR( _( "Export STEP" ) ), JOB_EXPORT_PCB_3D::FORMAT::STEP }; +static CLI::PCB_EXPORT_3D_COMMAND exportPcbVrmlCmd{ "vrml", UTF8STDSTR( _( "Export VRML" ) ), JOB_EXPORT_PCB_3D::FORMAT::VRML }; static CLI::PCB_EXPORT_SVG_COMMAND exportPcbSvgCmd{}; static CLI::PCB_EXPORT_PDF_COMMAND exportPcbPdfCmd{}; static CLI::PCB_EXPORT_POS_COMMAND exportPcbPosCmd{}; @@ -145,11 +145,11 @@ static CLI::SCH_ERC_COMMAND schErcCmd{}; static CLI::SCH_EXPORT_BOM_COMMAND exportSchBomCmd{}; static CLI::SCH_EXPORT_PYTHONBOM_COMMAND exportSchPythonBomCmd{}; static CLI::SCH_EXPORT_NETLIST_COMMAND exportSchNetlistCmd{}; -static CLI::SCH_EXPORT_PLOT_COMMAND exportSchDxfCmd{ "dxf", PLOT_FORMAT::DXF }; -static CLI::SCH_EXPORT_PLOT_COMMAND exportSchHpglCmd{ "hpgl", PLOT_FORMAT::HPGL }; -static CLI::SCH_EXPORT_PLOT_COMMAND exportSchPdfCmd{ "pdf", PLOT_FORMAT::PDF, false }; -static CLI::SCH_EXPORT_PLOT_COMMAND exportSchPostscriptCmd{ "ps", PLOT_FORMAT::POST }; -static CLI::SCH_EXPORT_PLOT_COMMAND exportSchSvgCmd{ "svg", PLOT_FORMAT::SVG }; +static CLI::SCH_EXPORT_PLOT_COMMAND exportSchDxfCmd{ "dxf", UTF8STDSTR( _( "Export DXF" ) ), PLOT_FORMAT::DXF }; +static CLI::SCH_EXPORT_PLOT_COMMAND exportSchHpglCmd{ "hpgl", UTF8STDSTR( _( "Export HPGL" ) ), PLOT_FORMAT::HPGL }; +static CLI::SCH_EXPORT_PLOT_COMMAND exportSchPdfCmd{ "pdf", UTF8STDSTR( _( "Export PDF" ) ), PLOT_FORMAT::PDF, false }; +static CLI::SCH_EXPORT_PLOT_COMMAND exportSchPostscriptCmd{ "ps", UTF8STDSTR( _( "Export PS" ) ), PLOT_FORMAT::POST }; +static CLI::SCH_EXPORT_PLOT_COMMAND exportSchSvgCmd{ "svg", UTF8STDSTR( _( "Export SVG" ) ), PLOT_FORMAT::SVG }; static CLI::FP_COMMAND fpCmd{}; static CLI::FP_EXPORT_COMMAND fpExportCmd{}; static CLI::FP_EXPORT_SVG_COMMAND fpExportSvgCmd{};