Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Please add a variable for the main folder name of the KiCAD project #421

Closed
rainer38 opened this issue Apr 15, 2023 · 2 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@rainer38
Copy link

Is your feature request related to a problem? Please describe.
I need a variable which contains the main KiCAD project folder name without the whole path.
For example if the project path would be "/home/user/Documents/kicad_project/testfile.kicad_pcb" the variable would contain "kicad_project".
My projects does not always have the same file- and folder name but the folder name is the one i need for generating output files.

Describe the solution you'd like
Please add a variable like %M (or something else) which represents the folder name of the KiCAD project.

Describe alternatives you've considered
I wrote a little python script which extracts the folder name and substitutes placeholders within the kibot.yaml file. But than i have to create custom configuration files for every project instead of using a global configuration.

@rainer38 rainer38 added the enhancement New feature or request label Apr 15, 2023
set-soft added a commit that referenced this issue Apr 15, 2023
- Directory where the pcb/sch resides. Only the last component
  i.e. /a/b/c/name.kicad_pcb -> c

Closes #421
@set-soft
Copy link
Member

Hi @rainer38 !
The above patch should do it, please test it. It passed a naive test.

@rainer38
Copy link
Author

It works like a charm. Thanks for the fast reaction. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants