This release is a pre-release and may not be stable for production use.
rename-kicad-project
rename-kicad-project is a nifty tool for renaming or cloning your KiCad (v4, v5) project.
Install
python3 -m pip install --user rename-kicad-project
Or with pipx,
pipx install rename-kicad-project
Usage
# Show helps
rename-kicad-project --help
# Show helps of `rename`
rename-kicad-project rename --help
# Show helps of `clone`
rename-kicad-project clone --help
rename
In the following example, ../foo/old_project_name{.pro, .sch, ...} will be renamed as ../foo/new_project_name.pro, ..., respectively.
rename-kicad-project rename ../foo new_project_name
# ls ../foo
# new_project_name.pro new_project_name.sch, ...
You may want to run the command above with --dry-run (-n) beforehand;
rename-kicad-project -n rename ../foo new_project_name
# Renaming: /path/to/old_project_name.kicad_pcb as new_project_name.kicad_pcb
# ...
clone
In the following example, ./foo/old_project_name{.pro, .sch, ...} will be cloned into /tmp/bar/new_project_name.pro, ..., respectively.
rename-kicad-project clone ./foo /tmp/bar -p new_project_name
# ls /tmp/bar
# new_project_name.pro new_project_name.sch, ...
You can omit -p to let the tool infer the new project name like /tmp/bar/bar.pro.
rename-kicad-project clone ./foo /tmp/bar
# ls /tmp/bar
# bar.pro bar.sch, ...
Note that /tmp/bar will be automatically created if it doesn't exist.
And as you expected, --dry-run also works with clone.
How it works
For the folks who wouldn't want to rely on someone's script, here is the basic work flow of this tool;
- In the given source directory, glob
*.profiles and based on the first found one, determine the current project name. (${PROJECT_NAME}.pro) - Determine target files with globbing
${PROJECT_NAME}.*and including some special files likefp-lib-table. - Rename the target files in place (
rename) or copy the files into the specified destination (clone). That' it!
License
MIT
Alternatives
- https://github.com/bobc/KiRename
- As of 2021-12, it only runs on Python 2.
Metadata
Release files for rename-kicad-project 1.0.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rename-kicad-project-1.0.0rc1.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rename_kicad_project-1.0.0rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / rename-kicad-project-1.0.0rc1.tar.gz
| Download URL | rename-kicad-project-1.0.0rc1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1bb797a886cf6341ccbf8071ba86b3f444594e6828a5af51a613f7120f4d94c1
|
|
BLAKE2b-256 checksum How to use checksums |
64e7f24c60d4ce30ad9beabb9fae03b9a6e51ca25b7c9a302afb8ba0613802c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.7.12 Linux/5.11.0-1022-azure
|
Release files / rename_kicad_project-1.0.0rc1-py3-none-any.whl
| Download URL | rename_kicad_project-1.0.0rc1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88992beef67760ebe71bb83754695818b201d14d9c162ed851646e4f6cc091f9
|
|
BLAKE2b-256 checksum How to use checksums |
a8e5497a7106810e2b44f4a7db924edcc59dd8987654ea2269832cdfcf45d685
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.7.12 Linux/5.11.0-1022-azure
|