devbisme / KiPart

Python package for generating multi-unit schematic symbols for KiCad from a CSV file.
MIT License
174 stars 46 forks source link

Append/Overwrite Flags Issue [KiPart BUG] #76

Closed CMcGGitHub closed 1 year ago

CMcGGitHub commented 1 year ago

Describe the bug -a (append) and -w (overwrite) flags not behaving as documented. Want to be able to overwrite existing parts on an existing library.

Documentation says -a, --append, --add Add parts to an existing part library. Overwrite existing parts only if used in conjunction with -w

To Reproduce Create test.lib containing 2 symbols kipart -o test.lib -a symbol1.csv symbol2.csv (Writing test.lib 2)

Update only symbol1 in test.lib kipart -o test.lib -a -w symbol1.csv (Writing test.lib 1)

Expected behavior In above scenario, I'd expect second step to update test.lib with the updated symbol1 and the unchanged symbol2 however only symbol1 gets written.

Workaround As I maintain all my kipart generated files in a single library, I work around this by putting all symbol.csv files onto the command line every time, instead of doing additions/modifications in an incremental manner.

Versions

Additional context Love the tool !!

devbisme commented 1 year ago

Thanks for entering this issue!

I created a new development branch with a potential fix for this problem. You can install it as follows:

pip install git+https://github.com/devbisme/kipart@development

Let me know if it works for you and then I'll release it on PyPi.

CMcGGitHub commented 1 year ago

-a and -w flags now behaving much better and I can update a library incrementally.

Thanks for the quick turnaround.

devbisme commented 1 year ago

Good! I'll release the new version on PyPi.