GitHub Tutorials For Noobs?

Hello -

I am working my way through the new tutorial put out on library organization by @Rene_Poschl and organizing my libraries according to the “advanced” procedure where you have the official and personal libraries in a writable location on the hard drive so new updates of Kicad don’t overwrite them and I can (theoretically) update the official libraries with git refreshes (or whatever it’s called in git lingo…).

I’m a noob with git as well as KiCad but did manage to download the git desktop onto my computer and I “think” it’s set up to refresh properly.

If there’s a simple git tutorial for people like me that are only interested in refreshing the kicad libraries (and DIgikey ones too when I get that set up) I’d much appreciate a link to one, or at least some general guidelines. Any of my search results seem to be far more advanced and assume I am writing software and doing all sorts of version control stuff with it. I just want the bare bones, “keep Kicad libraries up to date” stuff.

Maybe this is a good future tutorial for Rene to add to his excellent tutorial series on Kiad?

Thanks,
Lewis

The only commands you need to understand in that case are:
git clone [link to repo] (for getting the repo locally)
git pull (for getting the current state)

and possibly also git checkout [branch or tag] to switch to a particular release.

I added a more detailed description to the appendix section of the FAQ article (For future reference the FAQ article is found here: Library management in KiCad version 5)

When you get it figured out, Lewis, please post the github URLs so I can do the same thing you plan to do.

read the end of my tutorial. The links are in there :wink:

Thanks Rene ! I’m just off to read your additional info you mentioned in your library article. I’ll be back with more questions if they arise.

I have yet to “flick the switch” and change over the symbol and footprint library tables, but once I do that, if I follow your instructions on the advanced library management setup, other than the KISYS3DMOD, are the other environment variables just useless? (I did the browser / shift copy into the library tables).

Thanks
Lewis

The other variables are not necessarily useless. They allow you to move the library around while still keeping the official library table entries (Without that you would loose the description fields in the table)

But they are not required. If you prefer not to bother with them then you can do so.

Hmmm… I see that my description fields are now blank as a result of my shift/copy exercise… Is there an easy way to get them back but have the library paths changed over to point to the local git repo of the Kicad offcial libraries ? If not, it’s not a big deal I suppose, the library names are descriptive enough.

There’s a lot to learn about this library management stuff - probably like anything though, once you’ve worked with it awhile it becomes second nature (at least I hope so :grin:)

Thank you, @Rene_Poschl. Rather than muddle up this thread with asking for advice on how to integrate the revised fp-lib-table and the 115 .pretty folders into what is already on my hard drive, I will simply read this thread that Lewis started, and interject only when something doesn’t work as expected.

You can check out the reset to default settings option of the article.

Then point the path variables to your new location as shown in the picture in the advanced setup.

Another option would be to use a very powerful text editor that can handle multi row edits. (sublime style column edit) Or writing a small script (bash, python, …)
I doubt this would be easier than setting the path variables to point to your new library location :wink:

I was just about to write saying what you have just said - thanks. However, another question come up with this approach. If I do that, and then lets say a new library appears in the KiCad repo. I then refresh my local copy, and it makes its way there. How do I know that there is a new library waiting for me to link it into the library table? I mean, if I was blindly deleting the table and doing a shift/copy of the local repo, I would “catch” everything, but otherwise I would have to know there is a new library in the list and then go an individually load it into the library table. This is probably all academic, but figured I would ask.

Yes, writing scripts, and powerful text editors are not something I want to embark on just yet - I’m too busy trying to learn Kicad ! lol

Thanks again for your help (and patience)
Lewis

Welcome aboard the noob-train Russ…:joy:

That is a good question. For symbols we already publish a change-log on the release pages. I really need to get something like that up and running for footprints as well.
(Mentioning added libs should be easy enough for me to do with the next releases.)

The library tables in the repo are always kept up to date with the version they are in. This means you can overwrite the file in the config directory with that version (see reset to default section again)

You might want to make a backup of your previous table before that. As mentioned in the article you would then need to also add your personal libs again (should be quite easy to do with the library manager if you have all of them in a central location)

Another option would be the use of a text editor. Remove every entry that corresponds to the official library from your personal lib table (the one in the config directory). And copy the content of the newly downloaded version of the lib table into it. (only the lines defining libraries. Do not copy or delete the first or last line.)

Just realized there’s a “xxx_lib_table” thats in with the repo - I guess I can overwrite the

Ah ! ok - I think I understand. At this stage I don’t have anything much in my personal libs and there is only 1 personal lib so it’s not a problem for this approach. I will go off into my local repo of git and look for the lib table and play around with that. I’ve been doing all this tinkering with the symbol libraries first, assuming the footprints will be just the same approach.

Cheers,

If i get motivated then i might write a small python script for updating only the entries for the oficial library within your global library table.

Yes sir ! With service like that I won’t be asking for my money back on this software :wink:

Problems have arisen…

I seem to be able to set the environment variables in the Preferences>Configure Paths, but then when I save, I get this odd message that says “Warning! Some of the paths you have configured have been defined externally to the running process and will be temporarily overwritten.”

More details box reveals “The next time KiCad is launched, any paths that have already been defined are honored and any settings defined in the path configuration dialog are ignored. If you did not intend for this behavior, either rename any conflicting entries or remove the external environment variable definition(s) from your system”

Maybe I have to reset the environment variable somewhere else that I am not aware of ?

If I blindly proceed and then exit out of KiCad altogether, sure enough, when I relaunch Kicad, the environment variables are all pointing back to the installation locations and not my github repo clones…

You can see in the list which ones are externally defined. They have grey background. You can resize the dialog so that is shows all entries and show a screenshot.

What is your operating system?

My guess is it’s Windows and the installer has set the environment variables. If so, they have to be removed from the system.