← Back to team overview

kicad-developers team mailing list archive

Re: Footprint Wizard Farnell/Eagle.scr/Ultra librarian, and scripting, how to integrate

 

On 08/10/2012 02:50 AM, Edwin van den Oetelaar wrote:
> On Tue, Aug 7, 2012 at 9:07 AM, Miguel Angel Ajo Pelayo
> <miguelangel@xxxxxxx> wrote:
>> You can take a look at Dick's work here for Eagle layer conversion:
>>
>> http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/view/head:/pcbnew/eagle_plugin.cpp
>>
>> "int EAGLE_PLUGIN::kicad_layer( int aEagleLayer )"
>>
>>
>>
>>
>> 2012/8/7 Edwin van den Oetelaar <oetelaar.automatisering@xxxxxxxxx>
>>>
>>> On Tue, Aug 7, 2012 at 8:37 AM, Miguel Angel Ajo Pelayo <miguelangel@xxxxxxx> wrote:
>>>> I think almost everything could be done with python libraries, no extra deps:
>>>>
>>>> For https fetching  (https it's mandatory for the api): http://docs.python.org/library/httplib.html
>>>>
>>>> For json: use integrated python libraries:  http://docs.python.org/library/json.html?highlight=json
>>>>
>>>> For ZIP: http://docs.python.org/library/zipfile.html?highlight=zip#zipfile
>>>>
>>>> Parsing the file: http://theory.stanford.edu/~amitp/yapps/ or any other grammar compiler.
>>>
>>> Thanks for helping.
>>> At the moment I am looking at http://docs.python-requests.org/en/latest/index.html
>>> which I use in another project also, it handles http(s)/json very well. (doing RESTfull stuff)
>>>
>>> For the parser I was thinking about http://www.dabeaz.com/ply/ (python/lex/yacc) since I have done some real work before with flex/bison (what you know, hammer/nail kind of thing)
>>> I will take a look at the tools you suggested.
>>>
>>> *If anyone has a complete syntax diagram or any other document which 'defines' the SCR syntax fully, that would be very welcome. *
>>>
>>> I can extract most info from the http://www.cadsoft.de/wp-content/uploads/2011/05/V6_manual_en.pdf but it is not a reference/specification so errors will be made.
>>>
>>> Have a good day everyone,
>>> Edwin van den Oetelaar
> Hello everyone,
>
> I have been very busy working on a lexer and parser for the Eagle SCR
> files. (so we can do automatic import of Eagle footprints from the
> Farnell website)

Are they really Eagle footprints?  I don't think so.  I think they are footprints
generated by executing a scriplet in the eagle scripting language, which you intend to be
able to "execute" using python, correct?

True eagle footprints are actually now in XML format.  To read those you would simply fill
out EAGLE_PLUGIN::FootprintLoad().



>
> It was interesting, in some ways, I know more about Eagle now than I
> ever learned using it.
>
> *However, I would like your assistance... *
>
> Can you point me to some of the most extreme/funky or large SCR files
> (which define library parts)
> so I can stress my parser to the limit.
> Funky stuff with relative or polar coordinates, mixing of Mil,Mm and
> alike is very welcome to see if my parser breaks.
>
> Also welcome would be an SCR file of the standard Eagle libraries if
> someone here knows to find it please point me in the right direction.
>
> Thanks for your assistance, and have a very good day today,
> Edwin van den Oetelaar
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>



Follow ups

References