KiCad PCB EDA Suite
Loading...
Searching...
No Matches
kicad_cli.cpp File Reference
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/stdpaths.h>
#include <wx/wxcrtvararg.h>
#include <kiway.h>
#include <string_utils.h>
#include <paths.h>
#include <settings/settings_manager.h>
#include <settings/kicad_settings.h>
#include <systemdirsappend.h>
#include <trace_helpers.h>
#include <stdexcept>
#include "pgm_kicad.h"
#include "kicad_manager_frame.h"
#include <build_version.h>
#include <kiplatform/app.h>
#include <kiplatform/environment.h>
#include <locale_io.h>
#include "cli/command_pcb.h"
#include "cli/command_pcb_export.h"
#include "cli/command_pcb_drc.h"
#include "cli/command_pcb_render.h"
#include "cli/command_pcb_export_3d.h"
#include "cli/command_pcb_export_drill.h"
#include "cli/command_pcb_export_dxf.h"
#include "cli/command_pcb_export_gerber.h"
#include "cli/command_pcb_export_gerbers.h"
#include "cli/command_pcb_export_ipc2581.h"
#include "cli/command_pcb_export_pdf.h"
#include "cli/command_pcb_export_pos.h"
#include "cli/command_pcb_export_svg.h"
#include "cli/command_sch_export_bom.h"
#include "cli/command_sch_export_pythonbom.h"
#include "cli/command_sch_export_netlist.h"
#include "cli/command_sch_export_plot.h"
#include "cli/command_fp.h"
#include "cli/command_fp_export.h"
#include "cli/command_fp_export_svg.h"
#include "cli/command_fp_upgrade.h"
#include "cli/command_sch.h"
#include "cli/command_sch_erc.h"
#include "cli/command_sch_export.h"
#include "cli/command_sym.h"
#include "cli/command_sym_export.h"
#include "cli/command_sym_export_svg.h"
#include "cli/command_sym_upgrade.h"
#include "cli/command_version.h"
#include "cli/exit_codes.h"
#include <wx/app.h>
#include <kiface_base.h>

Go to the source code of this file.

Classes

struct  COMMAND_ENTRY
 
struct  APP_KICAD_CLI
 Not publicly visible because most of the action is in PGM_KICAD these days. More...
 

Functions

KIFACE_BASEKiface ()
 Global KIFACE_BASE "get" accessor.
 
static void recurseArgParserBuild (argparse::ArgumentParser &aArgParser, COMMAND_ENTRY &aEntry)
 
static COMMAND_ENTRYrecurseArgParserSubCommandUsed (argparse::ArgumentParser &aArgParser, COMMAND_ENTRY &aEntry)
 
static void printHelp (argparse::ArgumentParser &argParser)
 
KIWAY Kiway (KFCTL_CPP_PROJECT_SUITE|KFCTL_CLI)
 
PROJECTPrj ()
 

Variables

static CLI::PCB_COMMAND pcbCmd {}
 
static CLI::PCB_DRC_COMMAND pcbDrcCmd {}
 
static CLI::PCB_RENDER_COMMAND pcbRenderCmd {}
 
static CLI::PCB_EXPORT_DRILL_COMMAND exportPcbDrillCmd {}
 
static CLI::PCB_EXPORT_DXF_COMMAND exportPcbDxfCmd {}
 
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 exportPcbBrepCmd { "brep", UTF8STDSTR( _( "Export BREP" ) ), JOB_EXPORT_PCB_3D::FORMAT::BREP }
 
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 {}
 
static CLI::PCB_EXPORT_GERBER_COMMAND exportPcbGerberCmd {}
 
static CLI::PCB_EXPORT_GERBERS_COMMAND exportPcbGerbersCmd {}
 
static CLI::PCB_EXPORT_IPC2581_COMMAND exportPcbIpc2581Cmd {}
 
static CLI::PCB_EXPORT_COMMAND exportPcbCmd {}
 
static CLI::SCH_EXPORT_COMMAND exportSchCmd {}
 
static CLI::SCH_COMMAND schCmd {}
 
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", UTF8STDSTR( _( "Export DXF" ) ), SCH_PLOT_FORMAT::DXF }
 
static CLI::SCH_EXPORT_PLOT_COMMAND exportSchHpglCmd { "hpgl", UTF8STDSTR( _( "Export HPGL" ) ), SCH_PLOT_FORMAT::HPGL }
 
static CLI::SCH_EXPORT_PLOT_COMMAND exportSchPdfCmd { "pdf", UTF8STDSTR( _( "Export PDF" ) ), SCH_PLOT_FORMAT::PDF, false }
 
static CLI::SCH_EXPORT_PLOT_COMMAND exportSchPostscriptCmd { "ps", UTF8STDSTR( _( "Export PS" ) ), SCH_PLOT_FORMAT::POST }
 
static CLI::SCH_EXPORT_PLOT_COMMAND exportSchSvgCmd { "svg", UTF8STDSTR( _( "Export SVG" ) ), SCH_PLOT_FORMAT::SVG }
 
static CLI::FP_COMMAND fpCmd {}
 
static CLI::FP_EXPORT_COMMAND fpExportCmd {}
 
static CLI::FP_EXPORT_SVG_COMMAND fpExportSvgCmd {}
 
static CLI::FP_UPGRADE_COMMAND fpUpgradeCmd {}
 
static CLI::SYM_COMMAND symCmd {}
 
static CLI::SYM_EXPORT_COMMAND symExportCmd {}
 
static CLI::SYM_EXPORT_SVG_COMMAND symExportSvgCmd {}
 
static CLI::SYM_UPGRADE_COMMAND symUpgradeCmd {}
 
static CLI::VERSION_COMMAND versionCmd {}
 
static std::vector< COMMAND_ENTRYcommandStack
 
static PGM_KICAD program
 

Function Documentation

◆ Kiface()

KIFACE_BASE & Kiface ( )

Global KIFACE_BASE "get" accessor.

Definition at line 86 of file kicad_cli.cpp.

◆ Kiway()

KIWAY Kiway ( KFCTL_CPP_PROJECT_SUITE KFCTL_CLI)

◆ printHelp()

static void printHelp ( argparse::ArgumentParser &  argParser)
static

Definition at line 263 of file kicad_cli.cpp.

References From_UTF8().

◆ Prj()

PROJECT & Prj ( )

Definition at line 569 of file kicad_cli.cpp.

References Kiway, and KIWAY::Prj().

◆ recurseArgParserBuild()

static void recurseArgParserBuild ( argparse::ArgumentParser &  aArgParser,
COMMAND_ENTRY aEntry 
)
static

◆ recurseArgParserSubCommandUsed()

static COMMAND_ENTRY * recurseArgParserSubCommandUsed ( argparse::ArgumentParser &  aArgParser,
COMMAND_ENTRY aEntry 
)
static

Variable Documentation

◆ commandStack

std::vector<COMMAND_ENTRY> commandStack
static

Definition at line 146 of file kicad_cli.cpp.

◆ exportPcbBrepCmd

CLI::PCB_EXPORT_3D_COMMAND exportPcbBrepCmd { "brep", UTF8STDSTR( _( "Export BREP" ) ), JOB_EXPORT_PCB_3D::FORMAT::BREP }
static

Definition at line 115 of file kicad_cli.cpp.

◆ exportPcbCmd

CLI::PCB_EXPORT_COMMAND exportPcbCmd {}
static

Definition at line 123 of file kicad_cli.cpp.

◆ exportPcbDrillCmd

CLI::PCB_EXPORT_DRILL_COMMAND exportPcbDrillCmd {}
static

Definition at line 111 of file kicad_cli.cpp.

◆ exportPcbDxfCmd

CLI::PCB_EXPORT_DXF_COMMAND exportPcbDxfCmd {}
static

Definition at line 112 of file kicad_cli.cpp.

◆ exportPcbGerberCmd

CLI::PCB_EXPORT_GERBER_COMMAND exportPcbGerberCmd {}
static

Definition at line 120 of file kicad_cli.cpp.

◆ exportPcbGerbersCmd

CLI::PCB_EXPORT_GERBERS_COMMAND exportPcbGerbersCmd {}
static

Definition at line 121 of file kicad_cli.cpp.

◆ exportPcbGlbCmd

CLI::PCB_EXPORT_3D_COMMAND exportPcbGlbCmd { "glb", UTF8STDSTR( _( "Export GLB (binary GLTF)" ) ), JOB_EXPORT_PCB_3D::FORMAT::GLB }
static

Definition at line 113 of file kicad_cli.cpp.

◆ exportPcbIpc2581Cmd

CLI::PCB_EXPORT_IPC2581_COMMAND exportPcbIpc2581Cmd {}
static

Definition at line 122 of file kicad_cli.cpp.

◆ exportPcbPdfCmd

CLI::PCB_EXPORT_PDF_COMMAND exportPcbPdfCmd {}
static

Definition at line 118 of file kicad_cli.cpp.

◆ exportPcbPosCmd

CLI::PCB_EXPORT_POS_COMMAND exportPcbPosCmd {}
static

Definition at line 119 of file kicad_cli.cpp.

◆ exportPcbStepCmd

CLI::PCB_EXPORT_3D_COMMAND exportPcbStepCmd { "step", UTF8STDSTR( _( "Export STEP" ) ), JOB_EXPORT_PCB_3D::FORMAT::STEP }
static

Definition at line 114 of file kicad_cli.cpp.

◆ exportPcbSvgCmd

CLI::PCB_EXPORT_SVG_COMMAND exportPcbSvgCmd {}
static

Definition at line 117 of file kicad_cli.cpp.

◆ exportPcbVrmlCmd

CLI::PCB_EXPORT_3D_COMMAND exportPcbVrmlCmd { "vrml", UTF8STDSTR( _( "Export VRML" ) ), JOB_EXPORT_PCB_3D::FORMAT::VRML }
static

Definition at line 116 of file kicad_cli.cpp.

◆ exportSchBomCmd

CLI::SCH_EXPORT_BOM_COMMAND exportSchBomCmd {}
static

Definition at line 127 of file kicad_cli.cpp.

◆ exportSchCmd

CLI::SCH_EXPORT_COMMAND exportSchCmd {}
static

Definition at line 124 of file kicad_cli.cpp.

◆ exportSchDxfCmd

CLI::SCH_EXPORT_PLOT_COMMAND exportSchDxfCmd { "dxf", UTF8STDSTR( _( "Export DXF" ) ), SCH_PLOT_FORMAT::DXF }
static

Definition at line 130 of file kicad_cli.cpp.

◆ exportSchHpglCmd

CLI::SCH_EXPORT_PLOT_COMMAND exportSchHpglCmd { "hpgl", UTF8STDSTR( _( "Export HPGL" ) ), SCH_PLOT_FORMAT::HPGL }
static

Definition at line 131 of file kicad_cli.cpp.

◆ exportSchNetlistCmd

CLI::SCH_EXPORT_NETLIST_COMMAND exportSchNetlistCmd {}
static

Definition at line 129 of file kicad_cli.cpp.

◆ exportSchPdfCmd

CLI::SCH_EXPORT_PLOT_COMMAND exportSchPdfCmd { "pdf", UTF8STDSTR( _( "Export PDF" ) ), SCH_PLOT_FORMAT::PDF, false }
static

Definition at line 132 of file kicad_cli.cpp.

◆ exportSchPostscriptCmd

CLI::SCH_EXPORT_PLOT_COMMAND exportSchPostscriptCmd { "ps", UTF8STDSTR( _( "Export PS" ) ), SCH_PLOT_FORMAT::POST }
static

Definition at line 133 of file kicad_cli.cpp.

◆ exportSchPythonBomCmd

CLI::SCH_EXPORT_PYTHONBOM_COMMAND exportSchPythonBomCmd {}
static

Definition at line 128 of file kicad_cli.cpp.

◆ exportSchSvgCmd

CLI::SCH_EXPORT_PLOT_COMMAND exportSchSvgCmd { "svg", UTF8STDSTR( _( "Export SVG" ) ), SCH_PLOT_FORMAT::SVG }
static

Definition at line 134 of file kicad_cli.cpp.

◆ fpCmd

CLI::FP_COMMAND fpCmd {}
static

Definition at line 135 of file kicad_cli.cpp.

◆ fpExportCmd

CLI::FP_EXPORT_COMMAND fpExportCmd {}
static

Definition at line 136 of file kicad_cli.cpp.

◆ fpExportSvgCmd

CLI::FP_EXPORT_SVG_COMMAND fpExportSvgCmd {}
static

Definition at line 137 of file kicad_cli.cpp.

◆ fpUpgradeCmd

CLI::FP_UPGRADE_COMMAND fpUpgradeCmd {}
static

Definition at line 138 of file kicad_cli.cpp.

◆ pcbCmd

CLI::PCB_COMMAND pcbCmd {}
static

Definition at line 108 of file kicad_cli.cpp.

◆ pcbDrcCmd

CLI::PCB_DRC_COMMAND pcbDrcCmd {}
static

Definition at line 109 of file kicad_cli.cpp.

◆ pcbRenderCmd

CLI::PCB_RENDER_COMMAND pcbRenderCmd {}
static

Definition at line 110 of file kicad_cli.cpp.

◆ program

◆ schCmd

CLI::SCH_COMMAND schCmd {}
static

Definition at line 125 of file kicad_cli.cpp.

◆ schErcCmd

CLI::SCH_ERC_COMMAND schErcCmd {}
static

Definition at line 126 of file kicad_cli.cpp.

◆ symCmd

CLI::SYM_COMMAND symCmd {}
static

Definition at line 139 of file kicad_cli.cpp.

◆ symExportCmd

CLI::SYM_EXPORT_COMMAND symExportCmd {}
static

Definition at line 140 of file kicad_cli.cpp.

◆ symExportSvgCmd

CLI::SYM_EXPORT_SVG_COMMAND symExportSvgCmd {}
static

Definition at line 141 of file kicad_cli.cpp.

◆ symUpgradeCmd

CLI::SYM_UPGRADE_COMMAND symUpgradeCmd {}
static

Definition at line 142 of file kicad_cli.cpp.

◆ versionCmd

CLI::VERSION_COMMAND versionCmd {}
static

Definition at line 143 of file kicad_cli.cpp.