This is a repository that contains some scripts that are helpful for devices work. Over time, if members of the devices division think of or end up writing scripts that can help other members, they should add the code here to the repo.
These scripts should be runnable by any member in any directory, not just from the ./devices_helpers/
directory. This should make running scripts and writing out paths slightly easier.
To install, run the following commands in the ./devices_helpers/
directory:
chmod +x install_devices_helpers.sh
chmod +x uninstall_devices_helpers.sh
./install_devices_helpers.sh
source ~/.zshrc
To uninstall changes to the PATH that installation makes, run the following commands in the ./devices_helpers/
directory:
./uninstall_devices_helpers.sh
source ~/.zshrc
Descriptions of how to use each script are listed below. When a new script is added, documentation on how to use it should be added here.
This script takes in a CPL file autogenerated by KiCad and converts it to a format required by JLC.
To run the script, give an input (relative) path to the KiCad-generated CPL file (in csv format) and an output path where the newly created file should be saved. Note the output-csv-path does not have to be a pre-existing file when the script is run.
format_cpl_jlc.sh <input-csv-path> <output-csv-path>
For example, if we were in a project folder (not in devices_helpers/
) then we can use the below script to turn the autogenerated ./designs/CPL.csv
into the correct format and save it as corrected_CPL.csv
in the current terminal directory:
format_cpl_jlc.sh ./designs/CPL.csv ./corrected_CPL.csv