For me the first step: downloading the plugins was a breeze. Just a “git clone …”.
Just finding a place where to put the plugin was half an hour or maybe more work. I found at least 4 different places where KiCad does something with plugins or scripting. For me it was the first time ever I tried to use a script in KiCad.
I have at least:
/usr/share/kicad/plugins # This has BOM and netlist scripts.
/usr/share/kicad/scripting/plugins # This has the Footprint Wizards.
In the PCB User manual: file:///usr/share/doc/kicad/help/en/pcbnew.html#_kicad_scripting_reference I found:
On linux you can also keep your user plugins in $HOME/.kicad_plugins.
I also found some configuration files (but no scripts) in:
~/.config/kicad/
Certainly, but I do not know the place for a global install for these scripts in Linux. At the time I just wanted to focus on just getting the thing to work, and comment on the pdf draft.
I still don’t know what would be the “best” place. I was just happy I found a place that worked.
Agree, such detailed descriptions should be in the Pcbnew user manual, inclusive an overview of which scripts go where. That document is vague in this regard. A single line as a suggestion to where this script can be placed (even for a single user) seems a good Idea to me, so he can move on and focus on getting the script to work.
Also: Why are there 3 locations for KiCad stuff in the user directory?
This was one aspect of why I wrote the plugin and documentation. Before me there were three solutions to this problem. But none of them were actively supported, they didn’t have a GUI (you had to run a script within pcbnew python console) and their documentation was even worse than mine.
This is a really nice example how difficult is to write the documentation properly. Either you write it for experts, so you skip on basic issues (installation details, basic concepts). Or you write it for beginners so you might be to verbose for more knowledgeable user. It is hard to write balanced documentation, even more so as a developer because you are (or should be) an expert and it is hard to put yourself in the shoes of a beginner. So the more I think the more I see the validity of @Dave_Thomas’s remark. I’ll need to bite the bullet and write the documentation for two (or even more) cases. Simple and expert (and maybe intermediate).
As for installation instruction the ones published by Qu1ck in his InterractiveHtmlBom wiki are the best ones I’ve seen. I should put a link to them.
I do appreciate the discussion and experiences shared, but I currently lack the time to participate as much as I’d like to and I can not really process everything.
Just had a quick look at the Qu1ck’s InteractiveHTMLBom Wiki and then opened: Pcbnew / Tools / Scripting Console and pasted his 2 lines of code in it. The result is:
(Yes, some directories are listed twice, I don’t know why).
It also does not explain which sort of plugins should go where.
Edit: I did a bit of reading in:
and in the source code of the Replicate Layout plugin itself.
If I understand it correct, then KiCad just executes all plugins found in all plugin directories, and the plugins register themselves into the right location in KiCad. So any compatible location should work.
Usually the way it would work is that the /usr/shar/kicad directories would be sufficient for all users without then need in someplace like /home/paul.
The /home/paul/.config and /home/paul.kicad would only be used if the user wanted to override something in the /usr/share place.
Not saying that’s the way Kicad works–just the way most *nix applications work.
Anyway, I think for the purpose of this writeup should not be able how to install plugins. Documented at that location.
And to separate stuff if multiple users use the same PC.
For me it was quite a journey to find a decent place to put the script. It was the most difficult part of the whole tutorial. Just adding a location to put the script for Linux would be nice and maybe a link to more info of installing scripts.
I feel like I’m repeating myself. Is this some misunderstanding?
Anyway, it’s your .PDF, do with it as you like.