One script to rule them all

Yup I’ve seen it. While it is just a small change, it has to be tested. And since it has to be tested across all platforms it becomes a big task as more than one developer has to test it.

Also I’d rather not touch user home folder. This is just my personal opinion as I try to keep it nice and tidy.

Would you rather touch system folders? Touching them would require getting admin rights. This opens a whole new can of worms.

If so, it is ironic, because that’s my frustration, too. I also feel much of the criticism is based on assumptions which in the end are false, because people can’t read each others’ minds.

From the beginning I wanted this to be a proof-of-concept and see where it leads to. There’s nothing fixed and it can pretty easily adapted to many use cases. This “should handle everything” thing came out of bushes and I have no idea what kind of thing bobc has planned, so I just can’t say “yes I’ll do it”. After seeing the Arduino plugin system docs I can say that my system would very easily supports similar use cases, and then more. Everything is negotiable; I just can’t promise “I can do anything”.

And I want to be explicit about my intentions: if my project gives good ideas and someone because of it does something better, my project has served its purpose. I have no problem continuing it or abandoning it. It depends on community’s needs. That’s why all discussion is welcome, as long as it’s based on facts and doesn’t involve attacs towards persons or their characters or motives. I would love to see a blueprint for an alternative system, more than just one sentence.

No. I share your sentiments. One issue is lack of knowledge how different OS’s behave and implement features. And I am guilty of it.

I know that on windows you have

  • application installation folder (e.g. C:\Program Files\Kicad)
  • user home folder (C:\Users\username)
  • application per user folder (C:\Users\username\AppData\Kicad)

It is in “application per user folder” where I would put the plugins. The application has write privileges, which I am not certain that it has for user home folder. Kicad already uses this folder to store library tables and other configuration data.

I’ve tested this under kicad and it works and creates a file in “application per user folder”:

filename = dirname+'\\testfile.txt'
file = open(filename, "w")
file.write("hello")
file.close()```

I know that on linux there is a home folder, but is there a per app home folder? Where does Kicad store lib tables and settings in linux?

And not forgetting that not all users even have admin rights for their (work) machines. Pretty much every largish *nix program which has extensions has multiple locations where they search for them, including system-wide and user’s private.

The convention is that you put config stuff under ~/.config/app_name/
Some applications put extensions into the same folder.

Others simply put a ~/.app_name/ folder into the home directory. (Frecad is such an example)

Another option would be ~/.local/share/app_name/

I don’t know if there is a good place to put stuff that is intended to be write accessible by multiple users.


Applications in linux have the same privileges as the user starting the application. Unless restricted by things like SELinux

Yes the discussion across screen is hard, but that is all we have. If you stay on this forum long enough you get to know most of the contributors. And I can say that while bobc can sometimes come across rough (for the lack of the better word), I’ve always valued his contributions. His post usually carry a lot of depth an he usually sees things that at least I would (and did) miss.

so I assume in pcbnew scripting console pcbnew.GetKicadConfigPath() returns “~/.config/Kicad/”?

Yes, I tried to understand him and quickly looked at some of his recent posts (and having read them earlier), I came to the same conclusion. I just hope he tries to understand me, too.

Yes (at least in my two year old nightly under fedora 23. I can test the newest nightly under ubuntu when i am home again.)

Firstly, let me apologize for “roughness”. Often my mouth (or typing) races away with “that seems obvious to me, why don’t others get it?” despite better judgement. It’s a personal failing, and it’s best if I back off and chill out for a bit. So, I’m sorry about that.

Anyway, probably better I respond by doing rather than criticising, so my answer to “what would an alternative look like” is kipi. kipi handles the main functions, ideally there would be a GUI and a proper integration with KiCad, I might look into the GUI side.

I guess the main difference is that kipi runs outside of KiCad, otherwise I think it does most of what “lord of the plugins” does. For no particular reason I used yaml, but I quite like it’s simplicity.

2 Likes

Thank you, apology accepted.

I haven’t been active in development side at all lately, I try to look at your code some time later. Meanwhile, you definitely want to read this: https://lists.launchpad.net/kicad-developers/msg35276.html

Yes, I try to keep an eye on the dev list. There’s nothing currently on the roadmaps regarding library updating, but that could change any time.