Discussion:
How to convert my local library of module .mod into the new pretty format
Danilo Uccelli
2014-01-26 15:35:13 UTC
Permalink
Hi everybody,

I own a footprint library with a few more that 100 footprints.
Now, I compiled the last version of Kicad and I would convert this library
into the .pretty format.

I work on Debian Sid 64bits, I am searching since many hours a solution
without success.
I tried to use Kicadlibrarian (Windows version) but the results files give
me many error when I try to set the path of these folder on CvPcb, on the
project specific tab.

Here is an error example:

Errors were encountered loading footprints
PARSE_ERROR: Expecting ''('' in input/source
'/home/du/Kicadtest/Artwork/DUpack1.pretty/TO92-SPEC_TAN2.kicad_mod'
line 15
offset 12
from /home/du/Dev/build/kicad/kicad.bzr/common/dsnlexer.cpp : Expecting() :
line 304

If I delete this footprint, the error is reported on the next one.

What is the right and simple way to convert a .mod library on the .pretty
format.

Thank you in advance for your advise.
Danilo Uccelli
Bernd Wiebus
2014-01-26 17:38:02 UTC
Permalink
Hello Danilo.

Converting al library from old format to new pretty format is very
simple.

Just open the classic modules with the moduleditor and save export them
to the new *.kicad_module format.
This is for exporting one footprint by another.

Every *.kicad_module file contains only one footprint.

The pretty format is only a folder ending with *.pretty In this folder
are the single footprints as *.kicad_module files.

So one way to convert a hole library ist to create a folder
"foobar.pretty". leave it empty, because it will be overwritten.
Insert this folder into your library list at PCBnew. You should give
them a nickname

Than create a new empty board and put all components you want in the new
library onto this board.
Then choose at file > archive footprints > create footprint achive
a window pops up, and you are asked for the archive. give the nickname
of the library you had insertet into the library list bevore.

All footprints on the board wil be exported into this "foobar.pretty"
folder as "*.kicad_module" files.
So for managing this new library format you can use your favourite file
manager.


With best regards: Bernd Wiebus alias dl1eic
Post by Danilo Uccelli
Hi everybody,
I own a footprint library with a few more that 100 footprints.
Now, I compiled the last version of Kicad and I would convert this
library into the .pretty format.
I work on Debian Sid 64bits, I am searching since many hours a
solution without success.
I tried to use Kicadlibrarian (Windows version) but the results files
give me many error when I try to set the path of these folder on
CvPcb, on the project specific tab.
Errors were encountered loading footprints
PARSE_ERROR: Expecting ''('' in input/source
'/home/du/Kicadtest/Artwork/DUpack1.pretty/TO92-SPEC_TAN2.kicad_mod'
line 15
offset 12
Expecting() : line 304
If I delete this footprint, the error is reported on the next one.
What is the right and simple way to convert a .mod library on
the .pretty format.
Thank you in advance for your advise.
Danilo Uccelli
------------------------------------

Please read the Kicad FAQ in the group files section before posting your question.
Please post your bug reports here. They will be picked up by the creator of Kicad.
Please visit http://www.kicadlib.org for details of how to contribute your symbols/modules to the kicad library.
For building Kicad from source and other development questions visit the kicad-devel group at http://groups.yahoo.com/group/kicad-develYahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/kicad-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/kicad-users/join
(Yahoo! ID required)

<*> To change settings via email:
kicad-users-digest-***@public.gmane.org
kicad-users-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
kicad-users-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
http://info.yahoo.com/legal/us/yahoo/utos/terms/
Danilo Uccelli
2014-01-26 19:24:14 UTC
Permalink
Post by Bernd Wiebus
Post by Danilo Uccelli
...
I tried to use Kicadlibrarian (Windows version) but the results files
give me many error when I try to set the path of these folder on
CvPcb, on the project specific tab.
...
What is the right and simple way to convert a .mod library on
the .pretty format.
Hello Danilo.
Converting al library from old format to new pretty format is very
simple.
Just open the classic modules with the moduleditor and save export them
to the new *.kicad_module format.
This is for exporting one footprint by another.
Every *.kicad_module file contains only one footprint.
The pretty format is only a folder ending with *.pretty In this folder
are the single footprints as *.kicad_module files.
So one way to convert a hole library ist to create a folder
"foobar.pretty". leave it empty, because it will be overwritten.
Insert this folder into your library list at PCBnew. You should give
them a nickname
Than create a new empty board and put all components you want in the new
library onto this board.
Then choose at file > archive footprints > create footprint achive
a window pops up, and you are asked for the archive. give the nickname
of the library you had insertet into the library list bevore.
All footprints on the board wil be exported into this "foobar.pretty"
folder as "*.kicad_module" files.
So for managing this new library format you can use your favourite file
manager.
With best regards: Bernd Wiebus alias dl1eic
Bingo! Thank you very much Bernd,

You saved me!

Cheers.
Danilo Uccelli


------------------------------------

Please read the Kicad FAQ in the group files section before posting your question.
Please post your bug reports here. They will be picked up by the creator of Kicad.
Please visit http://www.kicadlib.org for details of how to contribute your symbols/modules to the kicad library.
For building Kicad from source and other development questions visit the kicad-devel group at http://groups.yahoo.com/group/kicad-develYahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/kicad-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/kicad-users/join
(Yahoo! ID required)

<*> To change settings via email:
kicad-users-digest-***@public.gmane.org
kicad-users-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
kicad-users-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
http://info.yahoo.com/legal/us/yahoo/utos/terms/
Bernd Wiebus
2014-01-26 21:44:28 UTC
Permalink
Hello Danilo.
Post by Danilo Uccelli
Post by Bernd Wiebus
Post by Danilo Uccelli
I tried to use Kicadlibrarian (Windows version) but the results files
give me many error when I try to set the path of these folder on
CvPcb, on the project specific tab.
Oh, sorry.
I missed this lines. My Netbook shows a Window like the view slots of a
tank....

Mmmmh. Up to now, i did not encounter this problems at Linux.
Perhaps somebody has a solution.

At a german forum, there is a guy telling a similar problem with windows
Version 4384 at W8.....seems you are not alone.

With best regards: Bernd Wiebus alias dl1eic
Post by Danilo Uccelli
Post by Bernd Wiebus
Post by Danilo Uccelli
...
What is the right and simple way to convert a .mod library on
the .pretty format.
Hello Danilo.
Converting al library from old format to new pretty format is very
simple.
Just open the classic modules with the moduleditor and save export them
to the new *.kicad_module format.
This is for exporting one footprint by another.
Every *.kicad_module file contains only one footprint.
The pretty format is only a folder ending with *.pretty In this folder
are the single footprints as *.kicad_module files.
So one way to convert a hole library ist to create a folder
"foobar.pretty". leave it empty, because it will be overwritten.
Insert this folder into your library list at PCBnew. You should give
them a nickname
Than create a new empty board and put all components you want in the new
library onto this board.
Then choose at file > archive footprints > create footprint achive
a window pops up, and you are asked for the archive. give the nickname
of the library you had insertet into the library list bevore.
All footprints on the board wil be exported into this "foobar.pretty"
folder as "*.kicad_module" files.
So for managing this new library format you can use your favourite file
manager.
With best regards: Bernd Wiebus alias dl1eic
Bingo! Thank you very much Bernd,
You saved me!
Cheers.
Danilo Uccelli
------------------------------------
Please read the Kicad FAQ in the group files section before posting your question.
Please post your bug reports here. They will be picked up by the creator of Kicad.
Please visit http://www.kicadlib.org for details of how to contribute your symbols/modules to the kicad library.
For building Kicad from source and other development questions visit the kicad-devel group at http://groups.yahoo.com/group/kicad-develYahoo Groups Links
------------------------------------

Please read the Kicad FAQ in the group files section before posting your question.
Please post your bug reports here. They will be picked up by the creator of Kicad.
Please visit http://www.kicadlib.org for details of how to contribute your symbols/modules to the kicad library.
For building Kicad from source and other development questions visit the kicad-devel group at http://groups.yahoo.com/group/kicad-develYahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/kicad-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/kicad-users/join
(Yahoo! ID required)

<*> To change settings via email:
kicad-users-digest-***@public.gmane.org
kicad-users-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
kicad-users-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
http://info.yahoo.com/legal/us/yahoo/utos/terms/
d***@public.gmane.org
2014-01-28 19:22:50 UTC
Permalink
First, your *.mod (aka Legacy) library need not be converted to continue using it. But if you really want to convert it read on.

Add a row in Library Tables menu option, with Lib Path equal to the name of the full path to the *.mod file. Select "Plugin Type"= Legacy" for that one row. Give it a nickname, typically the basename of the Lib Path (i.e. no file extension, no path.)

Click OK, verify you can browse that library in the library editor. Go back, try again, until you can.

If you want to convert to pretty format (aka KiCad format), then:

1) while in the library editor, select your Legacy library as current.
2) Menu: File -> Save Current Library As...
3) The file type in the file browser dialog should be left as *.pretty, which is in this case will be a directory, not a file, where you want to put the new library.
The conversion will run. Verify the *.pretty dir has been created, and that there are *.kicad_mod files in there.

4) Go back to Library Tables, and either edit your previous nickname by a) pointing its Lib Path to the new *.pretty directory and b) changing "Plugin Type" = KiCad, or by adding a new row which does the same for a new, unique nickname. Of these two paths, the former seems to make most sense for normal situations.


In general "Plugin Type" is a very important column in the Library Table. Notice you can use the freely available Eagle ver. >= 6.0 footprints on a read only basis also. Download that free software, install it, and point to the lib files in individual Lib Path rows in the Library Table. See the file fp-lib-table.for-eagle which has the whole library setup for you, on github at

https://github.com/KiCad/kicad-library/blob/master/template/fp-lib-table.for-eagle-6.4.0

In the Lib Path, environment variables may be used as substitution parameters. These must be set into your environment before starting KiCad. Also, you may cut and paste information to and from the actual grid in the Library Table dialog. This can be to and from a spreadsheet, cell, cells, row, rows, col, cols, or entire table.

You can also paste text from a text editor or web-browser if it is in the s-expression format referenced at the above link. Simply position at cell 0,0 in your Library Table, and paste the text. Make sure the cell editor is not active when you do the paste. This is a quick way to install a library from github, and it was my intention that anyone publishing a footprint library, also publish a fp-lib-table in s-expression form so that you can install the library in 15 seconds using the Github "Plugin Type".

For example, simply copy the text from here using your OS's "Copy" operation from the webbrowser, then Paste it into the bottom of your existing Library Table, either Global or Project Specific, after adding a blank row to represent the paste destination.

https://github.com/liftoff-sr/pretty_footprints/blob/master/README.md

Image now that everyone of you can publish your own footprint libraries on github, and that over time they get indexed by google, so that in time, after they are indexed by google, you can simply search for a footprint using google. If each repo has a README.md file formatted as above, you can install the library the google finds for you in 15 seconds, simply by copying the (fp_lib_table...)

s-expression text directly into your Library Table empty row bottom.


Dick
Danilo Uccelli
2014-01-28 21:02:08 UTC
Permalink
Hi Dick,

Thank you very much for this explanation!

Danilo Uccelli

Loading...