KiCad PCB EDA Suite
Loading...
Searching...
No Matches
command_sch_export_bom.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2023 Mike Williams <[email protected]>
5 * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef COMMAND_EXPORT_SCH_BOM_H
22#define COMMAND_EXPORT_SCH_BOM_H
23
25
26namespace CLI
27{
28// Options for selecting presets of the export, e.g. GroupedByValue and CSV
29#define ARG_PRESET "--preset"
30#define ARG_PRESET_DESC "Use a named BOM preset setting from the schematic, e.g. " \
31 "\"Grouped By Value\"."
32
33#define ARG_FMT_PRESET "--format-preset"
34#define ARG_FMT_PRESET_DESC "Use a named BOM format preset setting from the schematic, e.g. CSV."
35
36// Options for setting the format of the export, e.g. CSV
37#define ARG_FIELD_DELIMITER "--field-delimiter"
38#define ARG_FIELD_DELIMITER_DESC "Separator between output fields/columns."
39
40#define ARG_STRING_DELIMITER "--string-delimiter"
41#define ARG_STRING_DELIMITER_DESC "Character to surround fields with."
42
43#define ARG_REF_DELIMITER "--ref-delimiter"
44#define ARG_REF_DELIMITER_DESC "Character to place between individual references."
45
46#define ARG_REF_RANGE_DELIMITER "--ref-range-delimiter"
47#define ARG_REF_RANGE_DELIMITER_DESC "Character to place in ranges of references. Leave " \
48 "blank for no ranges."
49
50#define ARG_KEEP_TABS "--keep-tabs"
51#define ARG_KEEP_TABS_DESC "Keep tab characters from input fields. Stripped by default."
52
53#define ARG_KEEP_LINE_BREAKS "--keep-line-breaks"
54#define ARG_KEEP_LINE_BREAKS_DESC "Keep line break characters from input fields. Stripped " \
55 "by default."
56
57//Options for controlling the fields and the grouping
58#define ARG_FIELDS "--fields"
59#define ARG_FIELDS_DESC \
60 "An ordered list of fields to export. See documentation for special substitutions."
61
62#define ARG_LABELS "--labels"
63#define ARG_LABELS_DESC "An ordered list of labels to apply the exported fields."
64
65#define ARG_GROUP_BY "--group-by"
66#define ARG_GROUP_BY_DESC "Fields to group references by when field values match."
67
68#define ARG_SORT_FIELD "--sort-field"
69#define ARG_SORT_FIELD_DESC "Field name to sort by."
70
71#define ARG_SORT_ASC "--sort-asc"
72#define ARG_SORT_ASC_DESC "Sort ascending (true) or descending (false)."
73
74#define ARG_FILTER "--filter"
75#define ARG_FILTER_DESC "Filter string to remove output lines."
76
77#define ARG_EXCLUDE_DNP "--exclude-dnp"
78#define ARG_EXCLUDE_DNP_DESC "Exclude symbols marked Do-Not-Populate."
79
80#define ARG_INCLUDE_EXCLUDED_FROM_BOM "--include-excluded-from-bom"
81#define ARG_INCLUDE_EXCLUDED_FROM_BOM_DESC "Include symbols marked 'Exclude from BOM'."
82
84{
85public:
87
88protected:
89 int doPerform( KIWAY& aKiway ) override;
90
91private:
92 std::vector<wxString> convertStringList( const wxString& aList );
93};
94} // namespace CLI
95
96#endif
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.
std::vector< wxString > convertStringList(const wxString &aList)
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition: kiway.h:279
Definition: exit_codes.h:25