Skip to content

Commit

Permalink
[Quick Start][Added] ExportProject as copy files example
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Apr 10, 2024
1 parent b550a6b commit 6de5641
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/source/configuration/outputs/copy_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Note that you can use the `compress` output to create archives

Type: ``copy_files``

Categories: **PCB/docs**, **Schematic/docs**

Parameters:

Expand Down
19 changes: 14 additions & 5 deletions kibot/out_copy_files.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2022-2023 Salvador E. Tropea
# Copyright (c) 2022-2023 Instituto Nacional de Tecnología Industrial
# License: GPL-3.0
# Copyright (c) 2022-2024 Salvador E. Tropea
# Copyright (c) 2022-2024 Instituto Nacional de Tecnología Industrial
# License: AGPL-3.0
# Project: KiBot (formerly KiPlot)
from copy import copy
import fnmatch
Expand All @@ -11,7 +11,7 @@
from shutil import copy2
from .error import KiPlotConfigurationError
from .gs import GS
from .kiplot import config_output, get_output_dir, run_output
from .kiplot import config_output, get_output_dir, run_output, register_xmp_import
from .kicad.config import KiConf, LibAlias, FP_LIB_TABLE, SYM_LIB_TABLE
from .misc import WRONG_ARGUMENTS, INTERNAL_ERROR, W_COPYOVER, W_MISSLIB, W_MISSCMP
from .optionable import Optionable
Expand Down Expand Up @@ -402,13 +402,22 @@ def __init__(self):
with document:
self.options = Copy_FilesOptions
""" *[dict] Options for the `copy_files` output """
self._none_related = True
# The help is inherited and already mentions the default priority
self.fix_priority_help()
# Mostly oriented to the project copy
self._category = ['PCB/docs', 'Schematic/docs']
self._any_related = True

def get_dependencies(self):
return self.options.get_dependencies()

@staticmethod
def get_conf_examples(name, layers):
if GS.pcb_file and GS.sch_file and GS.pro_file:
# Add it only when we have a full project
register_xmp_import('ExportProject')
return []

def run(self, output_dir):
# No output member, just a dir
self.options.output_dir = output_dir
Expand Down

0 comments on commit 6de5641

Please sign in to comment.