95 lines
7.1 KiB
ReStructuredText
95 lines
7.1 KiB
ReStructuredText
.. Automatically generated by KiBot, please don't edit this file
|
|
|
|
.. index::
|
|
pair: Files copier; copy_files
|
|
|
|
Files copier
|
|
~~~~~~~~~~~~
|
|
|
|
Used to copy files to the output directory.
|
|
Useful when an external tool is used to compress the output directory. |br|
|
|
Note that you can use the `compress` output to create archives
|
|
|
|
Type: ``copy_files``
|
|
|
|
|
|
Parameters:
|
|
|
|
- **comment** :index:`: <pair: output - copy_files; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
|
- **dir** :index:`: <pair: output - copy_files; dir>` [string='./'] Output directory for the generated files.
|
|
If it starts with `+` the rest is concatenated to the default dir.
|
|
- **name** :index:`: <pair: output - copy_files; name>` [string=''] Used to identify this particular output definition.
|
|
Avoid using `_` as first character. These names are reserved for KiBot.
|
|
- **options** :index:`: <pair: output - copy_files; options>` [dict] Options for the `copy_files` output.
|
|
|
|
- Valid keys:
|
|
|
|
- **download** :index:`: <pair: output - copy_files - options; download>` [boolean=true] Downloads missing 3D models from KiCad git.
|
|
Only applies to models in KISYS3DMOD and KICAD6_3DMODEL_DIR.
|
|
They are downloaded to a temporal directory and discarded.
|
|
If you want to cache the downloaded files specify a directory using the
|
|
KIBOT_3D_MODELS environment variable.
|
|
- **files** :index:`: <pair: output - copy_files - options; files>` [list(dict)] Which files will be included.
|
|
|
|
- Valid keys:
|
|
|
|
- **source** :index:`: <pair: output - copy_files - options - files; source>` [string='*'] For the `files` and `out_files` mode this is th file names to add,
|
|
wildcards allowed. Use ** for recursive match.
|
|
For the `output` mode this is the name of the output.
|
|
For the `3d_models` is a pattern to match the name of the 3D models extracted from the PCB.
|
|
Not used for the `project` mode.
|
|
- **source_type** :index:`: <pair: output - copy_files - options - files; source_type>` [string='files'] [files,out_files,output,3d_models,project] From where do we get the files to be copied.
|
|
`files`: files relative to the current working directory.
|
|
`out_files`: files relative to output dir specified with `-d` command line option.
|
|
`output`: files generated by the output specified by `source`.
|
|
`3d_models`: 3D models used in the project.
|
|
`project`: schematic, PCB, footprints, symbols, 3D models and project files (KiCad 6+).
|
|
- ``dest`` :index:`: <pair: output - copy_files - options - files; dest>` [string=''] Destination directory inside the output dir, empty means the same of the file
|
|
relative to the source directory.
|
|
Note that when you specify a name here files are copied to this destination
|
|
without creating subdirs. The `project` mode is an exception.
|
|
For the `3d_models` type you can use DIR+ to create subdirs under DIR.
|
|
- ``filter`` :index:`: <pair: output - copy_files - options - files; filter>` [string='.*'] A regular expression that source files must match.
|
|
Not used for the `project` mode.
|
|
- ``save_pcb`` :index:`: <pair: output - copy_files - options - files; save_pcb>` [boolean=false] Only usable for the `3d_models` mode.
|
|
Save a PCB copy modified to use the copied 3D models.
|
|
You don't need to specify it for `project` mode.
|
|
|
|
- **no_virtual** :index:`: <pair: output - copy_files - options; no_virtual>` [boolean=false] Used to exclude 3D models for components with 'virtual' attribute.
|
|
- ``dnf_filter`` :index:`: <pair: output - copy_files - options; dnf_filter>` [string|list(string)='_none'] Name of the filter to mark components as not fitted.
|
|
A short-cut to use for simple cases where a variant is an overkill.
|
|
|
|
- ``download_lcsc`` :index:`: <pair: output - copy_files - options; download_lcsc>` [boolean=true] In addition to try to download the 3D models from KiCad git also try to get
|
|
them from LCSC database. In order to work you'll need to provide the LCSC
|
|
part number. The field containing the LCSC part number is defined by the
|
|
`field_lcsc_part` global variable.
|
|
- ``follow_links`` :index:`: <pair: output - copy_files - options; follow_links>` [boolean=true] Store the file pointed by symlinks, not the symlink.
|
|
- ``kicad_3d_url`` :index:`: <pair: output - copy_files - options; kicad_3d_url>` [string='https://gitlab.com/kicad/libraries/kicad-packages3D/-/raw/master/'] Base URL for the KiCad 3D models.
|
|
- ``kicad_3d_url_suffix`` :index:`: <pair: output - copy_files - options; kicad_3d_url_suffix>` [string=''] Text added to the end of the download URL.
|
|
Can be used to pass variables to the GET request, i.e. ?VAR1=VAL1&VAR2=VAL2.
|
|
- ``link_no_copy`` :index:`: <pair: output - copy_files - options; link_no_copy>` [boolean=false] Create symlinks instead of copying files.
|
|
- ``pre_transform`` :index:`: <pair: output - copy_files - options; pre_transform>` [string|list(string)='_none'] Name of the filter to transform fields before applying other filters.
|
|
A short-cut to use for simple cases where a variant is an overkill.
|
|
|
|
- ``variant`` :index:`: <pair: output - copy_files - options; variant>` [string=''] Board variant to apply.
|
|
|
|
- **type** :index:`: <pair: output - copy_files; type>` [string=''] Type of output.
|
|
- ``category`` :index:`: <pair: output - copy_files; category>` [string|list(string)=''] The category for this output. If not specified an internally defined category is used.
|
|
Categories looks like file system paths, i.e. **PCB/fabrication/gerber**.
|
|
The categories are currently used for `navigate_results`.
|
|
|
|
- ``disable_run_by_default`` :index:`: <pair: output - copy_files; disable_run_by_default>` [string|boolean] Use it to disable the `run_by_default` status of other output.
|
|
Useful when this output extends another and you don't want to generate the original.
|
|
Use the boolean true value to disable the output you are extending.
|
|
- ``extends`` :index:`: <pair: output - copy_files; extends>` [string=''] Copy the `options` section from the indicated output.
|
|
Used to inherit options from another output of the same type.
|
|
- ``groups`` :index:`: <pair: output - copy_files; groups>` [string|list(string)=''] One or more groups to add this output. In order to catch typos
|
|
we recommend to add outputs only to existing groups. You can create an empty group if
|
|
needed.
|
|
|
|
- ``output_id`` :index:`: <pair: output - copy_files; output_id>` [string=''] Text to use for the %I expansion content. To differentiate variations of this output.
|
|
- ``priority`` :index:`: <pair: output - copy_files; priority>` [number=11] [0,100] Priority for this output. High priority outputs are created first.
|
|
Internally we use 10 for low priority, 90 for high priority and 50 for most outputs.
|
|
- ``run_by_default`` :index:`: <pair: output - copy_files; run_by_default>` [boolean=true] When enabled this output will be created when no specific outputs are requested.
|
|
|