Author Topic: KiCad new footprint libraries (.pretty) packet.  (Read 31771 times)

0 Members and 1 Guest are viewing this topic.

Offline firewalkerTopic starter

  • Super Contributor
  • ***
  • Posts: 2452
  • Country: gr
KiCad new footprint libraries (.pretty) packet.
« on: January 28, 2014, 05:20:57 pm »
Is there a packet with all the new libraries? Why the had to create a separate git repo for every pcb familly?  :-// :-// :-//

Alexander.
Become a realist, stay a dreamer.

 

Offline metRo_

  • Regular Contributor
  • *
  • Posts: 90
  • Country: pt
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #1 on: February 08, 2014, 12:07:51 pm »
Isn't that what you want? https://github.com/KiCad/kicad-library
 

Offline firewalkerTopic starter

  • Super Contributor
  • ***
  • Posts: 2452
  • Country: gr
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #2 on: February 08, 2014, 12:11:21 pm »
No. Have a look at the README.md file.
Quote
The schematic and 3D libraries supported by KiCad team. Note that the footprint libraries are the *.pretty repos themselves.
Become a realist, stay a dreamer.

 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #3 on: February 09, 2014, 03:51:22 am »
No. Have a look at the README.md file.
Quote
The schematic and 3D libraries supported by KiCad team. Note that the footprint libraries are the *.pretty repos themselves.
It's really annoying too.. while I am using the libraries I have to wait for it to scan github and download something

I've decided today that I am going to clone the repo and have a local clone that I link to in my library

You just need to change the environment variable KIGITHUB (one more peeve... why can't I specify this library location from inside the program... it ONLY comes from the environment, outside.. so to change the location I have to restart Kicad)



 

Offline firewalkerTopic starter

  • Super Contributor
  • ***
  • Posts: 2452
  • Country: gr
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #4 on: February 09, 2014, 08:34:21 am »
Change KIGITHUB to point to what?

Alexander.
Become a realist, stay a dreamer.

 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #5 on: February 09, 2014, 01:19:12 pm »
Change KIGITHUB to point to what?

Alexander.

Actually, it's not that simple.. I thought it would be :(

However, what  I have done tonight is write a python script clone-kicad-repo.py  that will pull the needed repositories from github, using the file (on linux) /usr/local/share/kicad/template/fp-lib-table.for-github

Using the contents of that file it will 'git clone' every single repository that is in that file into the subdirectory /usr/local/share/kicad/github-repo
 
Finally, it will copy /usr/local/share/kicad/template/fp-lib-table.for-pretty to your home directory as fp-lib-table. This is where kicad looks (why not in the .kicad subdir ?? dumbasses!  )

As the last step to getting a local copy of the GitHub repositories, you need to set the environment variable KISYSMOD before running KiCad. This tells kicad to get the library from your local system.

Code: [Select]
   KISYSMOD=/usr/local/share/kicad/github-repo
You can change these paths at the top of the script.

The second script I wrote is called update-kicad-repo.py. This script can be used after you already have the many repositories locally and want to update your local copy with a git pull. There are 71 repositories, you don't want to do it manually.

Code: [Select]
Air_Coils_SML_NEOSID.pretty : Already up-to-date.
 Capacitors.pretty : Already up-to-date.
 Capacitors_Elko_ThroughHole.pretty : Already up-to-date.
 Capacitors_SMD.pretty : Already up-to-date.
 Connect.pretty : Already up-to-date.
 Connectors_Serial_MOLEX.pretty : Already up-to-date.
 Converters_DCDC_ACDC.pretty : Already up-to-date.
 Crystals.pretty : Already up-to-date.
 Crystals_Oscillators_SMD.pretty : Already up-to-date.
 Diodes_SMD.pretty : Already up-to-date.
 Diodes_ThroughHole.pretty : Already up-to-date.
 Discret.pretty : Already up-to-date.
 Display.pretty : Already up-to-date.

The scripts are not polished but they work, and you can use them. I share them here for anyone else that wants to maintain a local copy of the GitHub repository.

One last word.  This only clones the .pretty repositories for pcbnew, and does not clone the schematic repo at https://github.com/KiCad/kicad-library

posted as Linux only so far. I am going to test on Windows, and I will update this post for Windows after I install Windows, kicad and git into a fresh VirtualBox :)

Cheers!

« Last Edit: February 09, 2014, 01:25:48 pm by codeboy2k »
 

Offline firewalkerTopic starter

  • Super Contributor
  • ***
  • Posts: 2452
  • Country: gr
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #6 on: February 09, 2014, 03:29:07 pm »
Thanks m8!

I believe all this GIT thing is for KiCad to pull everything it needs it self. Always the latest versions.

Alexander.
Become a realist, stay a dreamer.

 

Offline RJSC

  • Regular Contributor
  • *
  • Posts: 126
  • Country: pt
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #7 on: February 09, 2014, 04:03:07 pm »
Does this mean the new versions of KiCAD as default cannot be used offline because the libraries are stored on github with no local cache?
 

Offline firewalkerTopic starter

  • Super Contributor
  • ***
  • Posts: 2452
  • Country: gr
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #8 on: February 09, 2014, 04:37:53 pm »
As I can understand the libraries will be cached on demand.

No one seems (at the time) to know how exactly to insert the github addresses to the FP_TABLE.

Alexander.
Become a realist, stay a dreamer.

 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #9 on: February 09, 2014, 04:48:21 pm »
As I can understand the libraries will be cached on demand.

No one seems (at the time) to know how exactly to insert the github addresses to the FP_TABLE.

Alexander.

Yes, they are cached, but I didn't see the cache was maintained between invocations.  It seemed like it was a per-session thing, and it  was always reloading them from github.

This method doesn't fly with me, as I have a slow line and I was seeing two or three second delays whenever I wanted to look at a part.  And the kicad library sucks, you can't see what a part looks like until you load it, so that meant clicking and downloading many parts that would be thrown away the next time I started kicad.

What do you mean no one knows how to insert the git hub addresses ?
You can edit the system global file /usr/local/share/kicad/template/fp-lib-table or your local version in your home directory.
« Last Edit: February 09, 2014, 04:51:33 pm by codeboy2k »
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #10 on: February 09, 2014, 04:55:18 pm »
Thanks m8!

I believe all this GIT thing is for KiCad to pull everything it needs it self. Always the latest versions.

Alexander.

Yes, I think that was the intention. But it's stupid silly to make it this way, with no "switch" or "button" on the UI to bring them all locally and check for changes at startup.  A simple 'git clone' and 'git pull' occasionally would have sufficed, as I wrote in the script.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #11 on: February 09, 2014, 04:57:07 pm »
Does this mean the new versions of KiCAD as default cannot be used offline because the libraries are stored on github with no local cache?
Yep, it does !

for offline use, use my script while you are online, and make a local copy.  Then use the update script occasionally to get changes, fixes, and new footprints/3d models

 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 964
  • Country: gb
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #12 on: February 09, 2014, 06:37:30 pm »
All this work automatically on my linux Kicad installation which I compile using the kicad-install.sh script. I still havent figured out how to set things up on Windows despite reading the pcbnew "Help" file. This system is WAY to complicated and difficult to understand. I've documented what I've tried here

https://www.eevblog.com/forum/open-source-kicad-geda/kicad-library-table-generator/msg384583/#msg384583

any clues as to what I'm doing wrong?

Thanks,

David.
David
Hertfordshire, UK
University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V8+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 PCB router Operator, Electronics instructor. Credited KiCad French to English translator
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #13 on: February 09, 2014, 08:25:27 pm »
If you want to use the git hub repo directly on Windows (instead of downloading it locally as I described) then you should copy the fp-table.for-github to a file called fp-table into your Windows home directory, which I think might be the Documents or My Documents folder.

Once you have this file in the correct home directory, it should show up in the program

I don't run it on windows so I don't know, I'll give it a try and let you know
 

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 964
  • Country: gb
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #14 on: February 09, 2014, 09:08:00 pm »
Yes, just figured it out. I just changed the file fp-lib-table.for-github to fp-lib-table and it all shows up OK. I'll try downloading a local copy later on so I can get any updates.
At least I've got some footprint available. Just got to figure out the schematic libraries next.

David.
David
Hertfordshire, UK
University Electronics Technician, London, PIC16/18, CCS PCM C, Arduino UNO, NANO,ESP32, KiCad V8+, Altium Designer 21.4.1, Alibre Design Expert 28 & FreeCAD beginner. LPKF S103,S62 PCB router Operator, Electronics instructor. Credited KiCad French to English translator
 

Offline wzy006

  • Newbie
  • Posts: 1
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #15 on: November 12, 2014, 06:41:02 pm »
I made a quick and dirty change of the code for windows. Thanks Codeboy2k. I removed the git path search, so please check if your git was installed in the same places as I set in the scripts. I also replace os.spawn with subprocess, because when I used os.spawnev, python crashed every time.

Finally, I removed the last step, which will copy fp-lib-table. Please manually do it. For windows, KiCad read fp-lib-table from x:\Users\*user_name*\AppData\Roaming\kicad, please manaully copy fp-lib-table.for-pretty as fp-lib-table, so KiCad will use $KIGITHUB instaed of $KISYSMOD.

in RunKiCad.bat add the following line to set path of KISYSMOD
SET KISYSMOD=C:\kicad-winbuilder-3.4\kicad\share\github-repo


clone-kicad-repo.py
Code: [Select]
#!/usr/bin/python

import re, os, sys, subprocess
import shutil

# change templatedir if you need to
# templatedir = '/usr/local/share/kicad/template'
templatedir = r'C:\kicad-winbuilder-3.4\kicad\share\template'

# set localdir to the location where you want to
# store your local copy of the GitHub repository
#localdir = '/usr/local/share/kicad/github-repo'
localdir = r'C:\kicad-winbuilder-3.4\kicad\share\github-repo'

github_table = 'fp-lib-table'
sys_table = 'fp-lib-table.for-pretty'
default_table = 'fp-lib-table'

env = {}
env.update(os.environ)
sep = ';' if (re.compile('^[wW][Ii][Nn]').match(sys.platform)) else ':'
KIGITHUB = 'https://github.com/KiCad'

found = None
paths = env['PATH'].split(sep)
for path in paths:
  fpath = os.path.join(path,'git')
  if (os.path.isfile(fpath) and os.access(fpath, os.X_OK)):
     found = True
     cmd = fpath
     break
cmd = r'C:\Program Files (x86)\Git\bin'
# if not found:
#  print "cannot find git executable"
#  exit(1)

args = [r'C:\Program Files (x86)\Git\bin\git', 'clone', 'x']

os.chdir(localdir)

template = os.path.join(templatedir, github_table)
for line in open(template,'rU'):
    mo = re.search(r'^.*\(\W*uri\W?([^)]*).*$',line)
    if mo:
       repo = mo.group(1).replace('${KIGITHUB}', KIGITHUB)
       args[2]=repo
       print localdir
       print args
       subprocess.call(args)
       print 'done x'

print "you now have a local copy of the GitHub repository"
print "in : ", localdir
print "updating KiCad ... "


env['HOME']='C:\Users\xxx'
frompath = os.path.join(templatedir,sys_table)
topath   = os.path.join(env['HOME'],default_table)

print ".. copying: ", frompath
print "......  to: ", topath
shutil.copyfile(frompath, topath)

print ".. done"
print
print "before running kicad, you will need to set"
print "the following environment variable:"
print
print "KISYSMOD=%s\n" % localdir



 

Offline Teemo

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ee
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #16 on: December 30, 2014, 01:57:48 am »
BRZ4022 version is already very useable.

From here on it goes according to:

Murphy's Law  #15 - "If you tinker with anything long enough, it will break." :P
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #17 on: February 01, 2015, 10:43:32 am »
BRZ4022 version is already very useable.

From here on it goes according to:

Murphy's Law  #15 - "If you tinker with anything long enough, it will break." :P

Agree with that! Classic case of feature bloat I think. Forcing users to fiddle with configs and write scripts just so they can create a usable installation is ridiculous. Kicad has turned into a bit of play tool for developers, people who don't mind coding and building their own unique installation, but is a nightmare for people who want to use it out of the box, or are people without programming skills.

All they really had to do was fix some bugs and clean up the interface.
Bob
"All you said is just a bunch of opinions."
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #18 on: February 03, 2015, 07:29:16 pm »
BRZ4022 version is already very useable.

From here on it goes according to:

Murphy's Law  #15 - "If you tinker with anything long enough, it will break." :P

Agree with that! Classic case of feature bloat I think. Forcing users to fiddle with configs and write scripts just so they can create a usable installation is ridiculous. Kicad has turned into a bit of play tool for developers, people who don't mind coding and building their own unique installation, but is a nightmare for people who want to use it out of the box, or are people without programming skills.

All they really had to do was fix some bugs and clean up the interface.

Except that they've been working very hard to make it easy to install on all of the major platforms. I've been using it successfully on OS X and it works quite well. They're at BZR 5403 now.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #19 on: February 08, 2015, 08:09:27 am »
Except that they've been working very hard to make it easy to install on all of the major platforms. I've been using it successfully on OS X and it works quite well. They're at BZR 5403 now.

I've been using it for years, IME it used to be very to install (unzip and run), now it is a PITA. It requires post-install config, which is then specific to each installation. If a user doesn't know what an "fp-lib-table" is, he is quickly forced to find out. Also makes it very difficult to share projects with other machines or people.

There are backward compatibility issues, so opening old projects can mess up. People even writing their own scripts to handle config issues, having to manually edit project files. They also have a policy of not providing stable releases, and everyone ends up using slightly different version with different bugs. People installing using their own patched source versions is frankly insane way to distribute software.

None of that says "easy to install" to me. I grant kicad team have been working very hard, but if it was on making installation easier they failed.

The kicker is there is nothing in the new version that is particularly worth having, apart from a few bug fixes (offset by lots of new bugs).

YMMV!
Bob
"All you said is just a bunch of opinions."
 

Offline nickoe

  • Contributor
  • Posts: 24
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #20 on: May 02, 2015, 11:39:51 am »
FYI you can download a zip of all the pretty libs from Jenkins.

Currently you can download on:
http://ci.kicad-pcb.org/job/any-kicad-pretty-lib-nightlies/lastSuccessfulBuild/artifact/*zip*/archive.zip

The job name might change in the future.

But also be aware that recently the footprint library wizards has been improved, such that it is easy to fetch the libs from within pcbnew.
 

Offline timofonic

  • Frequent Contributor
  • **
  • Posts: 904
  • Country: es
  • Eternal Wannabe Geek
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #21 on: May 03, 2015, 03:00:18 pm »
FYI you can download a zip of all the pretty libs from Jenkins.

Currently you can download on:
http://ci.kicad-pcb.org/job/any-kicad-pretty-lib-nightlies/lastSuccessfulBuild/artifact/*zip*/archive.zip

The job name might change in the future.

But also be aware that recently the footprint library wizards has been improved, such that it is easy to fetch the libs from within pcbnew.

Do the libs fetched from within pcbnew are  for schematic symbols too?
 

Offline nickoe

  • Contributor
  • Posts: 24
Re: KiCad new footprint libraries (.pretty) packet.
« Reply #22 on: May 03, 2015, 03:04:55 pm »
FYI you can download a zip of all the pretty libs from Jenkins.

Currently you can download on:
http://ci.kicad-pcb.org/job/any-kicad-pretty-lib-nightlies/lastSuccessfulBuild/artifact/*zip*/archive.zip

The job name might change in the future.

But also be aware that recently the footprint library wizards has been improved, such that it is easy to fetch the libs from within pcbnew.
Do the libs fetched from within pcbnew are  for schematic symbols too?
No, they are only for the pcbnew. The schematic libraies are in one single repo together with the 3D models. But that is off topic here.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf