← Back to team overview

kicad-developers team mailing list archive

Re: Re: New library file format


phinitnan_c wrote:
> --- In kicad-devel@xxxxxxxxxxxxxxx, Wayne Stambaugh <stambaughw@...> wrote:
>> phinitnan_c wrote:
>>> Hello,
>>> Refer to my previous thread,
>>> http://tech.groups.yahoo.com/group/kicad-devel/message/3625
>>> and a wiki page about new library system spec,
>>> http://kicad.sourceforge.net/wiki/index.php/New_Library_System_Spec
>>> I'd like to ask a few questions.
>>> 1) Is there developers working on the new library file format specification? I may be able to help.
>> The only proposed change to the library file format that I am aware of
>> is the one I proposed which is to merge the document file *.dcm with the
>> library file *.lib. I held off to see what additional information may
>> be required by the library updates that some of the other developers are
>> working on.
>>> 2) Is there the document for the current file format? I tried to find it with no luck.
>> Yes. You can check it out of SVN. The Kicad wiki has all the
>> information you need. It is in an OpenOffice.org format.
>>> 3) Would it be possible to use an existing database engine (eg. sqlite) to store library/module information?
>> Yes it would be possible. I think you will find most developers on this
>> list (this one include) prefer text file formats so that they can be
>> created, manipulated, and viewed with their favorite editor and command
>> line tools. I for one do not want the component definitions themselves
>> to be saved in a database. Tagging and file path information could be
>> put in a database for searching purposes but not the actual component
>> definitions themselves. If an acceptable search solution using tags in
>> plain text files cannot be developed, then a database may be an option.
>> I don't believe we have actually gotten to that point yet.
>> Wayne
> Thank you Wayne, the documents are lied in kicad-doc directory. I also prefer text. Some folks here think that it would be good if the file is more readable by human. I would like to propose a new file format based on an existing tool such as JSON (wxJSON, http://wxcode.sourceforge.net/docs/wxjson/). I think this will make the file more readable, flexible and extensible.

I agree that the current library and schematic file formats are not very
human readable. I believe they are legacy file formats that have been
with the project for some time. I am not familiar with JSON so I cannot
comment on how effective it would be. One thing I think it should
support is wxInputStream and wxOutputStream ( or C++ library istream and
ostream ). This way you only have to write one parser and one output
format to support streams from any of the derived input and output
stream classes. If you us wxInputStream to write you parser, you get
socket, file, zip, and tar input streams for very little extra effort.
With all of the new library discussions, I could see where any one of
the derived input and/or output streams would be useful.


> I started this thread for collecting ideas about what a library/module file should contain. Here are some suggestions in the group:
> - Library/Module versioning
> - Merge the document in the same library file
> Please share your idea here. Even if the new file format is not needed. These ideas can be included in the next version of file format.
> Note: I would start woking on the new file format if some folks here think it is interesting. Please leave your suggestion.


Follow ups