Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
On 10/01/2013 08:47 AM, Carl Poirier wrote:
> Hey I forgot to tell you yesterday that while moving the libs to GitHub, I 
> had to rename
> the "smd_crystal&oscillator" one since GitHub doesn't allow the '&' character 
> to be used.
> I called it "smd_crystal_and_oscillator", and thus it will fail with any 
> fp-lib-table
> based on the one I sent earlier, which was tailored to the converted local 
> files.
> 
> 


Quick poll:

What do folks think of *footprints* named like this?


   SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010


Attached is a revised fp-lib-table for GITHUB.  The nicknames are shorter, no 
revisions or
dates in them.


BTW, I much prefer something like this:


SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010_while_I_was_wearing_my_blue_shirt_after_lunch_where_we_ate_pizza



# Set GH environment variable to "https://github.com/CarlPoirier";
# before starting KiCad to use this fp table.

(fp_lib_table
  (lib (name 7Segment_16Sep2013)(type Github)(uri 
${GH}/7Segment_16Sep2013)(options "")(descr ""))
  (lib (name Allegro_HallCurrentSensor)(type Github)(uri 
${GH}/Allegro_ACS754_ACS755_ACS756_HallCurrentSensor_RevA)(options "")(descr 
""))
  (lib (name BNC-Sockets_RevA)(type Github)(uri ${GH}/BNC-Sockets_RevA)(options 
"")(descr ""))
  (lib (name Buzzer_Beeper_RevA_25Oct2010)(type Github)(uri 
${GH}/Buzzer_Beeper_RevA_25Oct2010)(options "")(descr ""))
  (lib (name capacitors)(type Github)(uri ${GH}/capacitors)(options "")(descr 
""))
  (lib (name Capacitors_SMD)(type Github)(uri 
${GH}/Capacitors_SMD_RevA)(options "")(descr ""))
  (lib (name Capacitors_ThroughHole)(type Github)(uri 
${GH}/Capacitors_ThroughHole_RevA)(options "")(descr ""))
  (lib (name Choke_Axial_ThroughHole)   (type Github)(uri 
${GH}/Choke_Axial_ThroughHole_RevB)(options "")(descr ""))
  (lib (name Choke_Radial_ThroughHole)  (type Github)(uri 
${GH}/Choke_Radial_ThroughHole_CD_Bobin_RevA)(options "")(descr ""))
  (lib (name Choke_SMD_RevB_28Dez2012)  (type Github)(uri 
${GH}/Choke_SMD_RevB_28Dez2012)(options "")(descr ""))
  (lib (name Choke_Toroid_ThroughHole)(type Github)(uri 
${GH}/Choke_Toroid_ThroughHole_RevC_06Aug2010)(options "")(descr ""))
  (lib (name CommonModeChoke_Wuerth)(type Github)(uri 
${GH}/CommonModeChoke_Wuerth_Type-WE-CMB_RevA_24Oct2010)(options "")(descr ""))
  (lib (name connect)(type Github)(uri ${GH}/connect)(options "")(descr ""))
  (lib (name connectors_molex_serial)(type Github)(uri 
${GH}/connectors_molex_serial_53047-A123)(options "")(descr ""))
  (lib (name Crystals)(type Github)(uri ${GH}/Crystals_RevB_20Apr2013)(options 
"")(descr ""))
  (lib (name DCDC-ACDC-Converter)(type Github)(uri 
${GH}/DCDC-ACDC-Converter_RevC_20Jul2012)(options "")(descr ""))
  (lib (name Dioden_SMD)(type Github)(uri 
${GH}/Dioden_SMD_RevA_31May2013)(options "")(descr ""))
  (lib (name Dioden_ThroughHole)(type Github)(uri 
${GH}/Dioden_ThroughHole_RevC)(options "")(descr ""))
  (lib (name dip_sockets)(type Github)(uri ${GH}/dip_sockets)(options "")(descr 
""))
  (lib (name discret)(type Github)(uri ${GH}/discret)(options "")(descr ""))
  (lib (name display)(type Github)(uri ${GH}/display)(options "")(descr ""))
  (lib (name divers)(type Github)(uri ${GH}/divers)(options "")(descr ""))
  (lib (name Elko_ThroughHole)(type Github)(uri 
${GH}/Elko_ThroughHole_RevB-3_30Dec2011)(options "")(descr ""))
  (lib (name EuroBoardoutline)(type Github)(uri 
${GH}/EuroBoardoutline_RevC)(options "")(descr ""))
  (lib (name Fiducials)(type Github)(uri 
${GH}/Fiducials_RevC_04Aug2012)(options "")(descr ""))
  (lib (name Footprint-Symbols)(type Github)(uri 
${GH}/Footprint-Symbols_RevD_28Aug2012)(options "")(descr ""))
  (lib (name FuseholderAndFuses)(type Github)(uri 
${GH}/FuseholderAndFuses_RevD_28Aug2012)(options "")(descr ""))
  (lib (name Heatsinks)(type Github)(uri ${GH}/Heatsinks_RevC)(options 
"")(descr ""))
  (lib (name inductors)(type Github)(uri ${GH}/inductors)(options "")(descr ""))
  (lib (name IR-directFET)(type Github)(uri 
${GH}/IR-directFET_Packages_RevB)(options "")(descr ""))
  (lib (name iut)(type Github)(uri ${GH}/iut)(options "")(descr ""))
  (lib (name Label)(type Github)(uri ${GH}/Label_RevA_21Mar2011)(options 
"")(descr ""))
  (lib (name led)(type Github)(uri ${GH}/led)(options "")(descr ""))
  (lib (name libcms)(type Github)(uri ${GH}/libcms)(options "")(descr ""))
  (lib (name Measurement_Point)(type Github)(uri 
${GH}/Measurement_Point_RevA)(options "")(descr ""))
  (lib (name Measurement-Scala)(type Github)(uri 
${GH}/Measurement-Scala_RevA)(options "")(descr ""))
  (lib (name Mechanical_Socket-Plug_DIN41612)(type Github)(uri 
${GH}/Mechanical_Socket-Plug_DIN41612-Stuff_RevA)(options "")(descr ""))
  (lib (name MiniUniversalMate-N-LokSockets)(type Github)(uri 
${GH}/MiniUniversalMate-N-LokSockets_13Aug2012)(options "")(descr ""))
  (lib (name MountingHole)(type Github)(uri ${GH}/MountingHole_RevA)(options 
"")(descr ""))
  (lib (name muonde)(type Github)(uri ${GH}/muonde)(optio

Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Cirilo Bernardo
- Original Message -

> From: Dick Hollenbeck 
> To: Carl Poirier 
> Cc: KiCad Developers 
> Sent: Friday, October 4, 2013 5:24 PM
> Subject: Re: [Kicad-developers] Github plugin.
> 
> On 10/01/2013 08:47 AM, Carl Poirier wrote:
>>  Hey I forgot to tell you yesterday that while moving the libs to GitHub, I 
> had to rename
>>  the "smd_crystal&oscillator" one since GitHub doesn't 
> allow the '&' character to be used.
>>  I called it "smd_crystal_and_oscillator", and thus it will fail 
> with any fp-lib-table
>>  based on the one I sent earlier, which was tailored to the converted local 
> files.
>> 
>> 
> 
> 
> Quick poll:
> 
> What do folks think of *footprints* named like this?
> 
> 
>    SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010
> 
> 
> Attached is a revised fp-lib-table for GITHUB.  The nicknames are shorter, no 
> revisions or
> dates in them.
> 
> 
> BTW, I much prefer something like this:
> 
> 
> SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010_while_I_was_wearing_my_blue_shirt_after_lunch_where_we_ate_pizza
> 
> 


That sounds like a good idea.  I'm all burned out for the day so I can't think 
if there would be any advantage to component_package_ rather than 
package_component_...  On the other hand, so long as there's an established 
naming scheme it will be possible to use key searches etc. to help users filter 
and wade through huge libraries in the future. I have a feeling some other 
metadata would also be useful such as any notes on compliance to specific 
standards and so on; this helps keep file names short by keeping the fine 
details elsewhere.

- Cirilo


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Interesting DLL Hell with SSL

2013-10-04 Thread Maciej Sumiński

Hi Brian,

In fact it looks very strange.. I am just wondering - wouldn't it be 
easier to link OpenSSL as a static library? It may require a rebuild in 
the KiCad-Winbuilder, but then you will not have to care about stuff 
that users keep in Windows directory.


Regards,
Orson

On 10/04/2013 12:28 AM, Brian Sidebotham wrote:

This project:
http://tibcoadmin.com/tibco/activematrix-businessworks/problem-with-libeay32-dll-and-ssleay32-dll/
 has
seen this behaviour too, and also concludes that the PATH is ignored in
the search for the library.

Their solution is to copy their DLL and overwrite the one in SysWOW64!
lol. What a mess.

Best Regards,

Brian.



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp




___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Wayne Stambaugh
On 10/4/2013 3:24 AM, Dick Hollenbeck wrote:
> On 10/01/2013 08:47 AM, Carl Poirier wrote:
>> Hey I forgot to tell you yesterday that while moving the libs to GitHub, I 
>> had to rename
>> the "smd_crystal&oscillator" one since GitHub doesn't allow the '&' 
>> character to be used.
>> I called it "smd_crystal_and_oscillator", and thus it will fail with any 
>> fp-lib-table
>> based on the one I sent earlier, which was tailored to the converted local 
>> files.
>>
>>
> 
> 
> Quick poll:
> 
> What do folks think of *footprints* named like this?
> 
> 
>SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010
> 
> 
> Attached is a revised fp-lib-table for GITHUB.  The nicknames are shorter, no 
> revisions or
> dates in them.
> 
> 
> BTW, I much prefer something like this:
> 
> 
> SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010_while_I_was_wearing_my_blue_shirt_after_lunch_where_we_ate_pizza
> 
> 

I alluded to this in my footprint library table call for help.  It is
impossible to fit some of the footprint library names and the footprint
names on a 1920X1200 display in CvPcb.  This not very usable when I can
only view a fraction of the name without scrolling.  You have my vote
for the shorter naming convention.  Why not put the extra information in
a comment now that pretty footprints handle comments?

Wayne

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
On 10/04/2013 06:59 AM, Wayne Stambaugh wrote:
> On 10/4/2013 3:24 AM, Dick Hollenbeck wrote:
>> On 10/01/2013 08:47 AM, Carl Poirier wrote:
>>> Hey I forgot to tell you yesterday that while moving the libs to GitHub, I 
>>> had to rename
>>> the "smd_crystal&oscillator" one since GitHub doesn't allow the '&' 
>>> character to be used.
>>> I called it "smd_crystal_and_oscillator", and thus it will fail with any 
>>> fp-lib-table
>>> based on the one I sent earlier, which was tailored to the converted local 
>>> files.
>>>
>>>
>>
>>
>> Quick poll:
>>
>> What do folks think of *footprints* named like this?
>>
>>
>>SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010
>>
>>
>> Attached is a revised fp-lib-table for GITHUB.  The nicknames are shorter, 
>> no revisions or
>> dates in them.
>>
>>
>> BTW, I much prefer something like this:
>>
>>
>> SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010_while_I_was_wearing_my_blue_shirt_after_lunch_where_we_ate_pizza
>>
>>
> 
> I alluded to this in my footprint library table call for help.  It is
> impossible to fit some of the footprint library names and the footprint
> names on a 1920X1200 display in CvPcb.  This not very usable when I can
> only view a fraction of the name without scrolling.  You have my vote
> for the shorter naming convention.  Why not put the extra information in
> a comment now that pretty footprints handle comments?
> 
> Wayne
> 

BTW, in revision 4362 I added the ability to right mouse popup "Paste" a 
(fp_lib_table)
s-expression text element into the DIALOG_FP_LIB_TABLE:

bzr log text:

"DIALOG_FP_LIB_TABLE does not use wxSplitterWindow, it would not obey.
Paste popup menu in this dialog now allows pasting a (fp_lib_table)
s-expression element holding (lib) elements.  This provides an
opportunity for GITHUB library publishers to put the table description
into their README.md file as a (fp_lib_table) element where it can
be quickly copied to clipboard and pasted into the fp lib table dialog.
This is a paste operation, and overwrites from the initial cursor position."


Then couple that with the ability to "index" or "catalog" footprints per pretty 
library in
the github README.md syntax:

  http://stackoverflow.com/questions/8655937/github-readme-and-readme-md

And you have the basis of a webpage on github that would let you quickly read 
about each
footprint in detail from the index (README.md).  And paste into your table 
editor quickly
the row you need to use it immediately.

While preparing the pretty library for publishing to any github repo, no doubt 
the
REAME.md text preparation could be automated (with a script?).  The result is a 
one page
summary of all footprints in the library in one place where it can be searched 
in a
webbrowser.  Where the webbrowser is used to "Copy" the (fp_lib_table) entry 
onto the
clipboard for pasting into the kicad DIALOG_FP_LIB_TABLE.

Pretty footprints can be sent through the mail, they should be able to come 
across the
clipboard, they should be copyable onto the clipboard from a webpage, they 
should be
expected from numerous external generators not part of KiCad, they should be 
pasteable
from clipboard into the module editor at least.

We have sort of reserved, in the pretty format, the top comment area for 
external
generators to use (coffeescript, python, etc.).  So we should not infringe on 
that comment
area without discussion with a number of footprint generating folks.

Short term our best options are to encourage preparation of a publishing 
guideline.  That
document would talk about what constitutes a good library, and how to prepare 
the
README.me file, and maybe even offer a wxPython script to prepare it 
automatically.
The REAME.me file should have the (fp_lib_table) near the top, which is the 
s-expression
text to add that library rapidly to the kicad table dialog using copy and paste,
webbrowser to KiCad.  For such (fp_lib_table) s-expression to be immediately be 
useful, it
should use environment variables.  The paste operation should be all that is 
needed to
make the footprint library *immediately* useable.

If you don't want to read about me wearing a blue shirt or eating pizza in the 
footprint
name, then probably that won't change until we have a true

  *footprint leadership person*
.

Leadership primarily entails setting baseline minimum expectations.  (It does 
not extend
to exclusion of bad libraries because anyone can always publish their own bad 
library
anywhere on GITHUB.)  Competition may breed success, or it may breed needles in 
haystacks.


Dick



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
On 10/04/2013 08:50 AM, Dick Hollenbeck wrote:
> On 10/04/2013 06:59 AM, Wayne Stambaugh wrote:
>> On 10/4/2013 3:24 AM, Dick Hollenbeck wrote:
>>> On 10/01/2013 08:47 AM, Carl Poirier wrote:
 Hey I forgot to tell you yesterday that while moving the libs to GitHub, I 
 had to rename
 the "smd_crystal&oscillator" one since GitHub doesn't allow the '&' 
 character to be used.
 I called it "smd_crystal_and_oscillator", and thus it will fail with any 
 fp-lib-table
 based on the one I sent earlier, which was tailored to the converted local 
 files.


>>>
>>>
>>> Quick poll:
>>>
>>> What do folks think of *footprints* named like this?
>>>
>>>
>>>SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010
>>>
>>>
>>> Attached is a revised fp-lib-table for GITHUB.  The nicknames are shorter, 
>>> no revisions or
>>> dates in them.
>>>
>>>
>>> BTW, I much prefer something like this:
>>>
>>>
>>> SOT23_Transistor_BC846_Handsoldering_RevA_03Aug2010_while_I_was_wearing_my_blue_shirt_after_lunch_where_we_ate_pizza
>>>
>>>
>>
>> I alluded to this in my footprint library table call for help.  It is
>> impossible to fit some of the footprint library names and the footprint
>> names on a 1920X1200 display in CvPcb.  This not very usable when I can
>> only view a fraction of the name without scrolling.  You have my vote
>> for the shorter naming convention.  Why not put the extra information in
>> a comment now that pretty footprints handle comments?
>>
>> Wayne
>>
> 
> BTW, in revision 4362 I added the ability to right mouse popup "Paste" a 
> (fp_lib_table)
> s-expression text element into the DIALOG_FP_LIB_TABLE:
> 
> bzr log text:
> 
> "DIALOG_FP_LIB_TABLE does not use wxSplitterWindow, it would not obey.
> Paste popup menu in this dialog now allows pasting a (fp_lib_table)
> s-expression element holding (lib) elements.  This provides an
> opportunity for GITHUB library publishers to put the table description
> into their README.md file as a (fp_lib_table) element where it can
> be quickly copied to clipboard and pasted into the fp lib table dialog.
> This is a paste operation, and overwrites from the initial cursor position."
> 
> 
> Then couple that with the ability to "index" or "catalog" footprints per 
> pretty library in
> the github README.md syntax:
> 
>   http://stackoverflow.com/questions/8655937/github-readme-and-readme-md
> 
> And you have the basis of a webpage on github that would let you quickly read 
> about each
> footprint in detail from the index (README.md).  And paste into your table 
> editor quickly
> the row you need to use it immediately.
> 
> While preparing the pretty library for publishing to any github repo, no 
> doubt the
> REAME.md text preparation could be automated (with a script?).  The result is 
> a one page
> summary of all footprints in the library in one place where it can be 
> searched in a
> webbrowser.  Where the webbrowser is used to "Copy" the (fp_lib_table) entry 
> onto the
> clipboard for pasting into the kicad DIALOG_FP_LIB_TABLE.
> 
> Pretty footprints can be sent through the mail, they should be able to come 
> across the
> clipboard, they should be copyable onto the clipboard from a webpage, they 
> should be
> expected from numerous external generators not part of KiCad, they should be 
> pasteable
> from clipboard into the module editor at least.
> 
> We have sort of reserved, in the pretty format, the top comment area for 
> external
> generators to use (coffeescript, python, etc.).  So we should not infringe on 
> that comment
> area without discussion with a number of footprint generating folks.
> 
> Short term our best options are to encourage preparation of a publishing 
> guideline.  That
> document would talk about what constitutes a good library, and how to prepare 
> the
> README.md

s/me/md

 file, and maybe even offer a wxPython script to prepare it automatically.
> The REAME.md file should have the (fp_lib_table) near the top, which is the 
> s-expression
> text to add that library rapidly to the kicad table dialog using copy and 
> paste,
> webbrowser to KiCad.  For such (fp_lib_table) s-expression to be immediately 
> be useful, it
> should use environment variables.  The paste operation should be all that is 
> needed to
> make the footprint library *immediately* useable.
> 
> If you don't want to read about me wearing a blue shirt or eating pizza in 
> the footprint
> name, then probably that won't change until we have a true
> 
>   *footprint leadership person*
> .
> 
> Leadership primarily entails setting baseline minimum expectations.  (It does 
> not extend
> to exclusion of bad libraries because anyone can always publish their own bad 
> library
> anywhere on GITHUB.)  Competition may breed success, or it may breed needles 
> in haystacks.
> 
> 
> Dick
> 
> 


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net

Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
Sorry.

> BTW, in revision 4362 I added the ability to right mouse popup "Paste" a 
> (fp_lib_table)
> s-expression text element into the DIALOG_FP_LIB_TABLE:
> 
> bzr log text:
> 
> "DIALOG_FP_LIB_TABLE does not use wxSplitterWindow, it would not obey.
> Paste popup menu in this dialog now allows pasting a (fp_lib_table)
> s-expression element holding (lib) elements.  This provides an
> opportunity for GITHUB library publishers to put the table description
> into their README.md file as a (fp_lib_table) element where it can
> be quickly copied to clipboard and pasted into the fp lib table dialog.
> This is a paste operation, and overwrites from the initial cursor position."
> 
> 
> Then couple that with the ability to "index" or "catalog" footprints per 
> pretty library in
> the github README.md syntax:
> 
>   http://stackoverflow.com/questions/8655937/github-readme-and-readme-md
> 
> And you have the basis of a webpage on github that would let you quickly read 
> about each
> footprint in detail from the index (README.md).  And paste into your table 
> editor quickly
> the row you need to use it immediately.
> 
> While preparing the pretty library for publishing to any github repo, no 
> doubt the
> REAME.md text preparation could be automated (with a script?).  The result is 
> a one page
> summary of all footprints in the library in one place where it can be 
> searched in a
> webbrowser.  Where the webbrowser is used to "Copy" the (fp_lib_table) entry 
> onto the
> clipboard for pasting into the kicad DIALOG_FP_LIB_TABLE.
> 
> Pretty footprints can be sent through the mail, they should be able to come 
> across the
> clipboard, they should be copyable onto the clipboard from a webpage, they 
> should be
> expected from numerous external generators not part of KiCad, they should be 
> pasteable
> from clipboard into the module editor at least.
> 
> We have sort of reserved, in the pretty format, the top comment area for 
> external
> generators to use (coffeescript, python, etc.).  So we should not infringe on 
> that comment
> area without discussion with a number of footprint generating folks.
> 
> Short term our best options are to encourage preparation of a publishing 
> guideline.  That
> document would talk about what constitutes a good library, and how to prepare 
> the
> README.md file, and maybe even offer a wxPython script to prepare it 
> automatically.
> The REAME.md file should have the (fp_lib_table) near the top, which is the 
> s-expression
> text to add that library rapidly to the kicad table dialog using copy and 
> paste,
> webbrowser to KiCad.  For such (fp_lib_table) s-expression to be immediately 
> be useful, it
> should 

not

> use environment variables.  The paste operation should be all that is needed 
> to
> make the footprint library *immediately* useable.
> 
> If you don't want to read about me wearing a blue shirt or eating pizza in 
> the footprint
> name, then probably that won't change until we have a true
> 
>   *footprint leadership person*
> .
> 
> Leadership primarily entails setting baseline minimum expectations.  (It does 
> not extend
> to exclusion of bad libraries because anyone can always publish their own bad 
> library
> anywhere on GITHUB.)  Competition may breed success, or it may breed needles 
> in haystacks.
> 
> 
> Dick
> 
> 


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck

>> Short term our best options are to encourage preparation of a publishing 
>> guideline.  That
>> document would talk about what constitutes a good library, 
>> and how to prepare the
>> README.md file, and maybe even offer a wxPython script to prepare it 
>> automatically.

See

   https://github.com/liftoff-sr/pretty_footprints

for a quick initial attempt I made at manual preparation this morning.  It 
allows:

1) quick copying and pasting of (fp_lib_table) element from HTML view at bottom 
of page
into a blank row of DIALOG_FP_LIB_TABLE.

2) has hyperlinks to every *raw* format pretty file, (which when someone adds 
(module)
s-expr clipboard pasting support to module editor, could be copied and pasted 
from
webbrowser into module editor.)  This offers yet another way just to grab one 
footprint
without bringing in the whole library as in 1) above.




___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] [PATCH] Need (path) in pretty library footprint?

2013-10-04 Thread Dick Hollenbeck
This patch keeps the (path) element out of pretty library (module)s.

OK?

Anything else we need like this?

=== modified file 'pcbnew/kicad_plugin.cpp'
--- pcbnew/kicad_plugin.cpp	2013-09-26 15:02:46 +
+++ pcbnew/kicad_plugin.cpp	2013-10-04 16:36:59 +
@@ -971,7 +971,7 @@
 m_out->Print( aNestLevel+1, "(tags %s)\n",
   m_out->Quotew( aModule->GetKeywords() ).c_str() );
 
-if( !aModule->GetPath().IsEmpty() )
+if( !( m_ctl & CTL_OMIT_PATH ) && aModule->GetPath() )
 m_out->Print( aNestLevel+1, "(path %s)\n",
   m_out->Quotew( aModule->GetPath() ).c_str() );
 

=== modified file 'pcbnew/kicad_plugin.h'
--- pcbnew/kicad_plugin.h	2013-09-26 05:29:54 +
+++ pcbnew/kicad_plugin.h	2013-10-04 16:39:02 +
@@ -42,6 +42,7 @@
 #define CTL_OMIT_NETS   (1 << 1)
 #define CTL_OMIT_TSTAMPS(1 << 2)
 #define CTL_OMIT_INITIAL_COMMENTS   (1 << 3)///< omit MODULE initial comments
+#define CTL_OMIT_PATH   (1 << 4)
 
 // common combinations of the above:
 
@@ -49,7 +50,7 @@
 #define CTL_FOR_CLIPBOARD   (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS)
 
 /// Format output for a footprint library instead of clipboard or BOARD
-#define CTL_FOR_LIBRARY (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS|CTL_OMIT_TSTAMPS)
+#define CTL_FOR_LIBRARY (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS|CTL_OMIT_TSTAMPS|CTL_OMIT_PATH)
 
 /// The zero arg constructor when PCB_IO is used for PLUGIN::Load() and PLUGIN::Save()ing
 /// a BOARD file underneath IO_MGR.

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Carl Poirier
I am also in favor of keeping simpler library names. The latest dialog
works well on my side, pasting the table from the README.md as well. Great
work there.

I'll try in the next few days to get a README.md generated for each pretty
library.

As for copying the whole table at once instead of going into each
repository, would having an empty repository containing only a README.md be
a good idea?


On Fri, Oct 4, 2013 at 12:06 PM, Dick Hollenbeck  wrote:

>
> >> Short term our best options are to encourage preparation of a
> publishing guideline.  That
> >> document would talk about what constitutes a good library,
> >> and how to prepare the
> >> README.md file, and maybe even offer a wxPython script to prepare it
> automatically.
>
> See
>
>https://github.com/liftoff-sr/pretty_footprints
>
> for a quick initial attempt I made at manual preparation this morning.  It
> allows:
>
> 1) quick copying and pasting of (fp_lib_table) element from HTML view at
> bottom of page
> into a blank row of DIALOG_FP_LIB_TABLE.
>
> 2) has hyperlinks to every *raw* format pretty file, (which when someone
> adds (module)
> s-expr clipboard pasting support to module editor, could be copied and
> pasted from
> webbrowser into module editor.)  This offers yet another way just to grab
> one footprint
> without bringing in the whole library as in 1) above.
>
>
>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
On Oct 4, 2013 12:08 PM, "Carl Poirier"  wrote:
>
> I am also in favor of keeping simpler library names. The latest dialog
works well on my side, pasting the table from the README.md as well. Great
work there.
>
> I'll try in the next few days to get a README.md generated for each
pretty library.
>
> As for copying the whole table at once instead of going into each
repository, would having an empty repository containing only a README.md be
a good idea?
>

For the 'official' libraries you converted, I committed
template/fp-lib-table.for-github. which you can help maintain.

I added no cmake install support for it yet.  But its in the source repo so
it won't get lost on mailing list.

I doubt if all our official libraries warrant the term 'official'.  Some
seem highly personal.  Grouping and naming seem chaotic.

I don't see leadership in this work, sorry.

Opportunity for someone I think.



>
> On Fri, Oct 4, 2013 at 12:06 PM, Dick Hollenbeck  wrote:
>>
>>
>> >> Short term our best options are to encourage preparation of a
publishing guideline.  That
>> >> document would talk about what constitutes a good library,
>> >> and how to prepare the
>> >> README.md file, and maybe even offer a wxPython script to prepare it
automatically.
>>
>> See
>>
>>https://github.com/liftoff-sr/pretty_footprints
>>
>> for a quick initial attempt I made at manual preparation this morning.
 It allows:
>>
>> 1) quick copying and pasting of (fp_lib_table) element from HTML view at
bottom of page
>> into a blank row of DIALOG_FP_LIB_TABLE.
>>
>> 2) has hyperlinks to every *raw* format pretty file, (which when someone
adds (module)
>> s-expr clipboard pasting support to module editor, could be copied and
pasted from
>> webbrowser into module editor.)  This offers yet another way just to
grab one footprint
>> without bringing in the whole library as in 1) above.
>>
>>
>>
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
On Oct 4, 2013 12:58 PM, "Dick Hollenbeck"  wrote:
>
>
> On Oct 4, 2013 12:08 PM, "Carl Poirier"  wrote:
> >
> > I am also in favor of keeping simpler library names. The latest dialog
works well on my side, pasting the table from the README.md as well. Great
work there.
> >
> > I'll try in the next few days to get a README.md generated for each
pretty library.
> >
> > As for copying the whole table at once instead of going into each
repository, would having an empty repository containing only a README.md be
a good idea?
> >

Your's is a good suggestion too.  It would be a mistake to think that I
need to approve, or any developer needs to approve good ideas pertaining to
footprint management.

The footprint management folks can elect their own leader.  I will not be
involved.




>
> For the 'official' libraries you converted, I committed
template/fp-lib-table.for-github. which you can help maintain.
>
> I added no cmake install support for it yet.  But its in the source repo
so it won't get lost on mailing list.
>
> I doubt if all our official libraries warrant the term 'official'.  Some
seem highly personal.  Grouping and naming seem chaotic.
>
> I don't see leadership in this work, sorry.
>
> Opportunity for someone I think.
>
>
>
> >
> > On Fri, Oct 4, 2013 at 12:06 PM, Dick Hollenbeck 
wrote:
> >>
> >>
> >> >> Short term our best options are to encourage preparation of a
publishing guideline.  That
> >> >> document would talk about what constitutes a good library,
> >> >> and how to prepare the
> >> >> README.md file, and maybe even offer a wxPython script to prepare
it automatically.
> >>
> >> See
> >>
> >>https://github.com/liftoff-sr/pretty_footprints
> >>
> >> for a quick initial attempt I made at manual preparation this morning.
 It allows:
> >>
> >> 1) quick copying and pasting of (fp_lib_table) element from HTML view
at bottom of page
> >> into a blank row of DIALOG_FP_LIB_TABLE.
> >>
> >> 2) has hyperlinks to every *raw* format pretty file, (which when
someone adds (module)
> >> s-expr clipboard pasting support to module editor, could be copied and
pasted from
> >> webbrowser into module editor.)  This offers yet another way just to
grab one footprint
> >> without bringing in the whole library as in 1) above.
> >>
> >>
> >>
> >
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck

> 
> Thank you for your amazing effort on the GitHub plugin.  I am looking
> forward to taking it for a test drive.  I hope to finish up the
> FP_LIB_TABLE code and documentation by the end of the weekend.  With all
> of the pieces in place, KiCad should have a really good footprint
> library management system.
> 
> Wayne


Thank you Wayne!

I gave you bug https://bugs.launchpad.net/bugs/1235317   :)

I also updated FP_LIB_TABLE class with the following API extensions, in 
*comment only*
form, just as a means of suggesting the API that we should be using in the 
library manager
when FP_LIB_TABLE is enabled.  These calls address all but the

a) library creation,
b) library deletion

functions, which I think may need to be done with the help of the 
DIALOG_FP_LIB_TABLE.  So
I defer those for now.

If we park the PLUGIN::RELEASER into the FP_LIB_TABLE we can easily cache the 
PLUGINs and
then these new API functions make sense.  PLUGIN::RELEASER is not currently up 
to the task
of operator=(), ( needed in ROW::operator=() ), but could be made so I assume.

Here are my suggested API function to bring into library management GUI, and 
remove
references to ROW in there.  The idea is that we get two primary benefits:

Uppercase letters to show significant benefits:

A) retention of every plugin's cache.
B) PROPERTIES can be passed to every PLUGIN::Footprint*() call.


Here are the new functions in class FP_LIB_TABLE, which one of us should build 
into the
library browser and editor UI IMO:


#if 0   // PLUGIN API SUBSET, REBASED ON aNickname

/**
 * Function FootprintEnumerate
 * returns a list of footprint names contained within the library given by
 * @a aNickname.
 *
 * @param aNickname is a locator for the "library", it is a "name"
 * in FP_LIB_TABLE::ROW
 *
 * @return wxArrayString - is the array of available footprint names inside
 *   a library
 *
 * @throw IO_ERROR if the library cannot be found, or footprint cannot be 
loaded.
 */
wxArrayString FootprintEnumerate( const wxString& aNickname ) const;

/**
 * Function FootprintLoad
 * loads a footprint having @a aFootprintName from the library given by @a 
aNickname.
 *
 * @param aNickname is a locator for the "library", it is a "name"
 * in FP_LIB_TABLE::ROW
 *
 * @param aFootprintName is the name of the footprint to load.
 *
 * @return  MODULE* - if found caller owns it, else NULL if not found.
 *
 * @throw   IO_ERROR if the library cannot be found or read.  No exception
 *  is thrown in the case where aFootprintName cannot be found.
 */
MODULE* FootprintLoad( const wxString& aNickname, const wxString& 
aFootprintName ) const;

/**
 * Function FootprintSave
 * will write @a aFootprint to an existing library given by @a aNickname.
 * If a footprint by the same name already exists, it is replaced.
 *
 * @param aNickname is a locator for the "library", it is a "name"
 * in FP_LIB_TABLE::ROW
 *
 * @param aFootprint is what to store in the library. The caller continues
 *to own the footprint after this call.
 *
 * @throw IO_ERROR if there is a problem saving.
 */
void FootprintSave( const wxString& aNickname, const MODULE* aFootprint );

/**
 * Function FootprintDelete
 * deletes the @a aFootprintName from the library given by @a aNickname.
 *
 * @param aNickname is a locator for the "library", it is a "name"
 * in FP_LIB_TABLE::ROW
 *
 * @param aFootprintName is the name of a footprint to delete from the 
specified library.
 *
 * @throw IO_ERROR if there is a problem finding the footprint or the 
library, or
deleting it.
 */
void FootprintDelete( const wxString& aNickname, const wxString& 
aFootprintName );

/**
 * Function IsFootprintLibWritable
 * returns true iff the library given by @a aNickname is writable.  (Often
 * system libraries are read only because of where they are installed.)
 *
 * @throw IO_ERROR if no library at aLibraryPath exists.
 */
bool IsFootprintLibWritable( const wxString& aNickname );

#endif


These are now in the repo, but commented out.

They mirror the similarly named ones in the PLUGIN class, but omit the 
PROPERTIES* since
they are in the ROW, and aNickname takes the place of aLibraryPath.  Good 
symmetry otherwise.

GITHUB plugin will yield great benefits from these changes, but will still be 
too slow for
the "List All" footprint select dialog.  I have a couple of ideas in mind for 
that issue.
 Having the "options" in place will give us more options, including COW 
support, or
launching multiple threads to do the "List All" function.

Again, I am deferring library create and delete into the future, and want to 
think of
those processes as being fully subject to change when USE_FP_LIB_TABLE is in 
play.


Dick



_

Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
On 10/04/2013 02:22 PM, Dick Hollenbeck wrote:
> 
>>
>> Thank you for your amazing effort on the GitHub plugin.  I am looking
>> forward to taking it for a test drive.  I hope to finish up the
>> FP_LIB_TABLE code and documentation by the end of the weekend.  With all
>> of the pieces in place, KiCad should have a really good footprint
>> library management system.
>>
>> Wayne
> 
> 
> Thank you Wayne!
> 
> I gave you bug https://bugs.launchpad.net/bugs/1235317   :)
> 
> I also updated FP_LIB_TABLE class with the following API extensions, in 
> *comment only*
> form, just as a means of suggesting the API that we should be using in the 
> library manager
> when FP_LIB_TABLE is enabled.  These calls address all but the
> 
> a) library creation,
> b) library deletion
> 
> functions, which I think may need to be done with the help of the 
> DIALOG_FP_LIB_TABLE.  So
> I defer those for now.
> 
> If we park the PLUGIN::RELEASER into the FP_LIB_TABLE we can easily cache the 
> PLUGINs and
> then these new API functions make sense.  PLUGIN::RELEASER is not currently 
> up to the task
> of operator=(), ( needed in ROW::operator=() ), but could be made so I assume.
> 
> Here are my suggested API function to bring into library management GUI, and 
> remove
> references to ROW in there.  The idea is that we get two primary benefits:
> 
> Uppercase letters to show significant benefits:
> 
> A) retention of every plugin's cache.

ROW's PLUGIN_RELEASER plugin;


> B) PROPERTIES can be passed to every PLUGIN::Footprint*() call.
> 
> 
> Here are the new functions in class FP_LIB_TABLE, which one of us should 
> build into the
> library browser and editor UI IMO:
> 
> 
> #if 0   // PLUGIN API SUBSET, REBASED ON aNickname
> 
> /**
>  * Function FootprintEnumerate
>  * returns a list of footprint names contained within the library given by
>  * @a aNickname.
>  *
>  * @param aNickname is a locator for the "library", it is a "name"
>  * in FP_LIB_TABLE::ROW
>  *
>  * @return wxArrayString - is the array of available footprint names 
> inside
>  *   a library
>  *
>  * @throw IO_ERROR if the library cannot be found, or footprint cannot be 
> loaded.
>  */
> wxArrayString FootprintEnumerate( const wxString& aNickname ) const;
> 
> /**
>  * Function FootprintLoad
>  * loads a footprint having @a aFootprintName from the library given by 
> @a aNickname.
>  *
>  * @param aNickname is a locator for the "library", it is a "name"
>  * in FP_LIB_TABLE::ROW
>  *
>  * @param aFootprintName is the name of the footprint to load.
>  *
>  * @return  MODULE* - if found caller owns it, else NULL if not found.
>  *
>  * @throw   IO_ERROR if the library cannot be found or read.  No exception
>  *  is thrown in the case where aFootprintName cannot be found.
>  */
> MODULE* FootprintLoad( const wxString& aNickname, const wxString& 
> aFootprintName ) const;
> 
> /**
>  * Function FootprintSave
>  * will write @a aFootprint to an existing library given by @a aNickname.
>  * If a footprint by the same name already exists, it is replaced.
>  *
>  * @param aNickname is a locator for the "library", it is a "name"
>  * in FP_LIB_TABLE::ROW
>  *
>  * @param aFootprint is what to store in the library. The caller continues
>  *to own the footprint after this call.
>  *
>  * @throw IO_ERROR if there is a problem saving.
>  */
> void FootprintSave( const wxString& aNickname, const MODULE* aFootprint );
> 
> /**
>  * Function FootprintDelete
>  * deletes the @a aFootprintName from the library given by @a aNickname.
>  *
>  * @param aNickname is a locator for the "library", it is a "name"
>  * in FP_LIB_TABLE::ROW
>  *
>  * @param aFootprintName is the name of a footprint to delete from the 
> specified library.
>  *
>  * @throw IO_ERROR if there is a problem finding the footprint or the 
> library, or
> deleting it.
>  */
> void FootprintDelete( const wxString& aNickname, const wxString& 
> aFootprintName );
> 
> /**
>  * Function IsFootprintLibWritable
>  * returns true iff the library given by @a aNickname is writable.  (Often
>  * system libraries are read only because of where they are installed.)
>  *
>  * @throw IO_ERROR if no library at aLibraryPath exists.
>  */
> bool IsFootprintLibWritable( const wxString& aNickname );
> 
> #endif
> 
> 
> These are now in the repo, but commented out.
> 
> They mirror the similarly named ones in the PLUGIN class, but omit the 
> PROPERTIES* since
> they are in the ROW, and aNickname takes the place of aLibraryPath.  Good 
> symmetry otherwise.
> 
> GITHUB plugin will yield great benefits from these changes, but will still be 
> too slow for
> the "List All" footprint select dialog.  I have a couple of ideas in mind for 
> that issue.
>  Ha

Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Wayne Stambaugh
On 10/4/2013 3:22 PM, Dick Hollenbeck wrote:
> 
>>
>> Thank you for your amazing effort on the GitHub plugin.  I am looking
>> forward to taking it for a test drive.  I hope to finish up the
>> FP_LIB_TABLE code and documentation by the end of the weekend.  With all
>> of the pieces in place, KiCad should have a really good footprint
>> library management system.
>>
>> Wayne
> 
> 
> Thank you Wayne!
> 
> I gave you bug https://bugs.launchpad.net/bugs/1235317   :)

I noticed that :)  I took a quick look at the module editor and saving a
library may not be the only place where this will be a problem.  The
current code attempts to determine the correct plugin by the library
path using IO_MGR::GuessPluginTypeFromLibPath().  It appear that this is
where things are causing the problem.  I'll have to do a debug build on
Linux with the GIT_HUB_PLUGIN enabled in order to test this so it might
take me a day or so to get it all sorted out.

> 
> I also updated FP_LIB_TABLE class with the following API extensions, in 
> *comment only*
> form, just as a means of suggesting the API that we should be using in the 
> library manager
> when FP_LIB_TABLE is enabled.  These calls address all but the
> 
> a) library creation,
> b) library deletion
> 
> functions, which I think may need to be done with the help of the 
> DIALOG_FP_LIB_TABLE.  So
> I defer those for now.
> 
> If we park the PLUGIN::RELEASER into the FP_LIB_TABLE we can easily cache the 
> PLUGINs and
> then these new API functions make sense.  PLUGIN::RELEASER is not currently 
> up to the task
> of operator=(), ( needed in ROW::operator=() ), but could be made so I assume.
> 
> Here are my suggested API function to bring into library management GUI, and 
> remove
> references to ROW in there.  The idea is that we get two primary benefits:
> 
> Uppercase letters to show significant benefits:
> 
> A) retention of every plugin's cache.
> B) PROPERTIES can be passed to every PLUGIN::Footprint*() call.
> 
> 
> Here are the new functions in class FP_LIB_TABLE, which one of us should 
> build into the
> library browser and editor UI IMO:
> 
> 
> #if 0   // PLUGIN API SUBSET, REBASED ON aNickname
> 
> /**
>  * Function FootprintEnumerate
>  * returns a list of footprint names contained within the library given by
>  * @a aNickname.
>  *
>  * @param aNickname is a locator for the "library", it is a "name"
>  * in FP_LIB_TABLE::ROW
>  *
>  * @return wxArrayString - is the array of available footprint names 
> inside
>  *   a library
>  *
>  * @throw IO_ERROR if the library cannot be found, or footprint cannot be 
> loaded.
>  */
> wxArrayString FootprintEnumerate( const wxString& aNickname ) const;
> 
> /**
>  * Function FootprintLoad
>  * loads a footprint having @a aFootprintName from the library given by 
> @a aNickname.
>  *
>  * @param aNickname is a locator for the "library", it is a "name"
>  * in FP_LIB_TABLE::ROW
>  *
>  * @param aFootprintName is the name of the footprint to load.
>  *
>  * @return  MODULE* - if found caller owns it, else NULL if not found.
>  *
>  * @throw   IO_ERROR if the library cannot be found or read.  No exception
>  *  is thrown in the case where aFootprintName cannot be found.
>  */
> MODULE* FootprintLoad( const wxString& aNickname, const wxString& 
> aFootprintName ) const;
> 
> /**
>  * Function FootprintSave
>  * will write @a aFootprint to an existing library given by @a aNickname.
>  * If a footprint by the same name already exists, it is replaced.
>  *
>  * @param aNickname is a locator for the "library", it is a "name"
>  * in FP_LIB_TABLE::ROW
>  *
>  * @param aFootprint is what to store in the library. The caller continues
>  *to own the footprint after this call.
>  *
>  * @throw IO_ERROR if there is a problem saving.
>  */
> void FootprintSave( const wxString& aNickname, const MODULE* aFootprint );
> 
> /**
>  * Function FootprintDelete
>  * deletes the @a aFootprintName from the library given by @a aNickname.
>  *
>  * @param aNickname is a locator for the "library", it is a "name"
>  * in FP_LIB_TABLE::ROW
>  *
>  * @param aFootprintName is the name of a footprint to delete from the 
> specified library.
>  *
>  * @throw IO_ERROR if there is a problem finding the footprint or the 
> library, or
> deleting it.
>  */
> void FootprintDelete( const wxString& aNickname, const wxString& 
> aFootprintName );
> 
> /**
>  * Function IsFootprintLibWritable
>  * returns true iff the library given by @a aNickname is writable.  (Often
>  * system libraries are read only because of where they are installed.)
>  *
>  * @throw IO_ERROR if no library at aLibraryPath exists.
>  */
> bool IsFootprintLibWritable( const wxString& aNickname );
> 
> #endif
> 
> 
> 

Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
On 10/04/2013 03:15 PM, Wayne Stambaugh wrote:
> On 10/4/2013 3:22 PM, Dick Hollenbeck wrote:
>>
>>>
>>> Thank you for your amazing effort on the GitHub plugin.  I am looking
>>> forward to taking it for a test drive.  I hope to finish up the
>>> FP_LIB_TABLE code and documentation by the end of the weekend.  With all
>>> of the pieces in place, KiCad should have a really good footprint
>>> library management system.
>>>
>>> Wayne
>>
>>
>> Thank you Wayne!
>>
>> I gave you bug https://bugs.launchpad.net/bugs/1235317   :)
> 
> I noticed that :)  I took a quick look at the module editor and saving a
> library may not be the only place where this will be a problem.  The
> current code attempts to determine the correct plugin by the library
> path using IO_MGR::GuessPluginTypeFromLibPath().  It appear that this is
> where things are causing the problem.  I'll have to do a debug build on
> Linux with the GIT_HUB_PLUGIN enabled in order to test this so it might
> take me a day or so to get it all sorted out.

The stuff below should be used in place of that, I have it on my to do list 
already, as
you can see.

If you don't want to do it, I will.


> 
>>
>> I also updated FP_LIB_TABLE class with the following API extensions, in 
>> *comment only*
>> form, just as a means of suggesting the API that we should be using in the 
>> library manager
>> when FP_LIB_TABLE is enabled.  These calls address all but the
>>
>> a) library creation,
>> b) library deletion
>>
>> functions, which I think may need to be done with the help of the 
>> DIALOG_FP_LIB_TABLE.  So
>> I defer those for now.
>>
>> If we park the PLUGIN::RELEASER into the FP_LIB_TABLE we can easily cache 
>> the PLUGINs and
>> then these new API functions make sense.  PLUGIN::RELEASER is not currently 
>> up to the task
>> of operator=(), ( needed in ROW::operator=() ), but could be made so I 
>> assume.
>>
>> Here are my suggested API function to bring into library management GUI, and 
>> remove
>> references to ROW in there.  The idea is that we get two primary benefits:
>>
>> Uppercase letters to show significant benefits:
>>
>> A) retention of every plugin's cache.
>> B) PROPERTIES can be passed to every PLUGIN::Footprint*() call.
>>
>>
>> Here are the new functions in class FP_LIB_TABLE, which one of us should 
>> build into the
>> library browser and editor UI IMO:
>>
>>
>> #if 0   // PLUGIN API SUBSET, REBASED ON aNickname
>>
>> /**
>>  * Function FootprintEnumerate
>>  * returns a list of footprint names contained within the library given 
>> by
>>  * @a aNickname.
>>  *
>>  * @param aNickname is a locator for the "library", it is a "name"
>>  * in FP_LIB_TABLE::ROW
>>  *
>>  * @return wxArrayString - is the array of available footprint names 
>> inside
>>  *   a library
>>  *
>>  * @throw IO_ERROR if the library cannot be found, or footprint cannot 
>> be loaded.
>>  */
>> wxArrayString FootprintEnumerate( const wxString& aNickname ) const;
>>
>> /**
>>  * Function FootprintLoad
>>  * loads a footprint having @a aFootprintName from the library given by 
>> @a aNickname.
>>  *
>>  * @param aNickname is a locator for the "library", it is a "name"
>>  * in FP_LIB_TABLE::ROW
>>  *
>>  * @param aFootprintName is the name of the footprint to load.
>>  *
>>  * @return  MODULE* - if found caller owns it, else NULL if not found.
>>  *
>>  * @throw   IO_ERROR if the library cannot be found or read.  No 
>> exception
>>  *  is thrown in the case where aFootprintName cannot be found.
>>  */
>> MODULE* FootprintLoad( const wxString& aNickname, const wxString& 
>> aFootprintName ) const;
>>
>> /**
>>  * Function FootprintSave
>>  * will write @a aFootprint to an existing library given by @a aNickname.
>>  * If a footprint by the same name already exists, it is replaced.
>>  *
>>  * @param aNickname is a locator for the "library", it is a "name"
>>  * in FP_LIB_TABLE::ROW
>>  *
>>  * @param aFootprint is what to store in the library. The caller 
>> continues
>>  *to own the footprint after this call.
>>  *
>>  * @throw IO_ERROR if there is a problem saving.
>>  */
>> void FootprintSave( const wxString& aNickname, const MODULE* aFootprint 
>> );
>>
>> /**
>>  * Function FootprintDelete
>>  * deletes the @a aFootprintName from the library given by @a aNickname.
>>  *
>>  * @param aNickname is a locator for the "library", it is a "name"
>>  * in FP_LIB_TABLE::ROW
>>  *
>>  * @param aFootprintName is the name of a footprint to delete from the 
>> specified library.
>>  *
>>  * @throw IO_ERROR if there is a problem finding the footprint or the 
>> library, or
>> deleting it.
>>  */
>> void FootprintDelete( const wxString& aNickname, const wxString& 
>> aFootprintName );
>>
>> /**
>>  * Function IsFootprintLibWrita

Re: [Kicad-developers] Github plugin.

2013-10-04 Thread Dick Hollenbeck
On 10/04/2013 03:30 PM, Dick Hollenbeck wrote:
> On 10/04/2013 03:15 PM, Wayne Stambaugh wrote:
>> On 10/4/2013 3:22 PM, Dick Hollenbeck wrote:
>>>

 Thank you for your amazing effort on the GitHub plugin.  I am looking
 forward to taking it for a test drive.  I hope to finish up the
 FP_LIB_TABLE code and documentation by the end of the weekend.  With all
 of the pieces in place, KiCad should have a really good footprint
 library management system.

 Wayne
>>>
>>>
>>> Thank you Wayne!
>>>
>>> I gave you bug https://bugs.launchpad.net/bugs/1235317   :)
>>
>> I noticed that :)  I took a quick look at the module editor and saving a
>> library may not be the only place where this will be a problem.  The
>> current code attempts to determine the correct plugin by the library
>> path using IO_MGR::GuessPluginTypeFromLibPath().

Probably no environment substitution on lib path, if you want a quick hack.

The GITHUB plugin is not useable until the stuff below is complete however, and 
it will
get done in any case:  The library browser needs to be based on the nickname 
now, for
reasons I've mentioned in the last week.


  It appear that this is
>> where things are causing the problem.  I'll have to do a debug build on
>> Linux with the GIT_HUB_PLUGIN enabled in order to test this so it might
>> take me a day or so to get it all sorted out.
> 
> The stuff below should be used in place of that, I have it on my to do list 
> already, as
> you can see.
> 
> If you don't want to do it, I will.
> 
> 
>>
>>>
>>> I also updated FP_LIB_TABLE class with the following API extensions, in 
>>> *comment only*
>>> form, just as a means of suggesting the API that we should be using in the 
>>> library manager
>>> when FP_LIB_TABLE is enabled.  These calls address all but the
>>>
>>> a) library creation,
>>> b) library deletion
>>>
>>> functions, which I think may need to be done with the help of the 
>>> DIALOG_FP_LIB_TABLE.  So
>>> I defer those for now.
>>>
>>> If we park the PLUGIN::RELEASER into the FP_LIB_TABLE we can easily cache 
>>> the PLUGINs and
>>> then these new API functions make sense.  PLUGIN::RELEASER is not currently 
>>> up to the task
>>> of operator=(), ( needed in ROW::operator=() ), but could be made so I 
>>> assume.
>>>
>>> Here are my suggested API function to bring into library management GUI, 
>>> and remove
>>> references to ROW in there.  The idea is that we get two primary benefits:
>>>
>>> Uppercase letters to show significant benefits:
>>>
>>> A) retention of every plugin's cache.
>>> B) PROPERTIES can be passed to every PLUGIN::Footprint*() call.
>>>
>>>
>>> Here are the new functions in class FP_LIB_TABLE, which one of us should 
>>> build into the
>>> library browser and editor UI IMO:
>>>
>>>
>>> #if 0   // PLUGIN API SUBSET, REBASED ON aNickname
>>>
>>> /**
>>>  * Function FootprintEnumerate
>>>  * returns a list of footprint names contained within the library given 
>>> by
>>>  * @a aNickname.
>>>  *
>>>  * @param aNickname is a locator for the "library", it is a "name"
>>>  * in FP_LIB_TABLE::ROW
>>>  *
>>>  * @return wxArrayString - is the array of available footprint names 
>>> inside
>>>  *   a library
>>>  *
>>>  * @throw IO_ERROR if the library cannot be found, or footprint cannot 
>>> be loaded.
>>>  */
>>> wxArrayString FootprintEnumerate( const wxString& aNickname ) const;
>>>
>>> /**
>>>  * Function FootprintLoad
>>>  * loads a footprint having @a aFootprintName from the library given by 
>>> @a aNickname.
>>>  *
>>>  * @param aNickname is a locator for the "library", it is a "name"
>>>  * in FP_LIB_TABLE::ROW
>>>  *
>>>  * @param aFootprintName is the name of the footprint to load.
>>>  *
>>>  * @return  MODULE* - if found caller owns it, else NULL if not found.
>>>  *
>>>  * @throw   IO_ERROR if the library cannot be found or read.  No 
>>> exception
>>>  *  is thrown in the case where aFootprintName cannot be found.
>>>  */
>>> MODULE* FootprintLoad( const wxString& aNickname, const wxString& 
>>> aFootprintName ) const;
>>>
>>> /**
>>>  * Function FootprintSave
>>>  * will write @a aFootprint to an existing library given by @a 
>>> aNickname.
>>>  * If a footprint by the same name already exists, it is replaced.
>>>  *
>>>  * @param aNickname is a locator for the "library", it is a "name"
>>>  * in FP_LIB_TABLE::ROW
>>>  *
>>>  * @param aFootprint is what to store in the library. The caller 
>>> continues
>>>  *to own the footprint after this call.
>>>  *
>>>  * @throw IO_ERROR if there is a problem saving.
>>>  */
>>> void FootprintSave( const wxString& aNickname, const MODULE* aFootprint 
>>> );
>>>
>>> /**
>>>  * Function FootprintDelete
>>>  * deletes the @a aFootprintName from the library given by @a aNickname.
>>>  *
>>>  *

[Kicad-developers] [PATCH] Github plugin. FP_LIB_TABLE

2013-10-04 Thread Dick Hollenbeck
On 10/04/2013 03:41 PM, Dick Hollenbeck wrote:
> On 10/04/2013 03:30 PM, Dick Hollenbeck wrote:
>> On 10/04/2013 03:15 PM, Wayne Stambaugh wrote:
>>> On 10/4/2013 3:22 PM, Dick Hollenbeck wrote:

>
> Thank you for your amazing effort on the GitHub plugin.  I am looking
> forward to taking it for a test drive.  I hope to finish up the
> FP_LIB_TABLE code and documentation by the end of the weekend.  With all
> of the pieces in place, KiCad should have a really good footprint
> library management system.
>
> Wayne


 Thank you Wayne!

 I gave you bug https://bugs.launchpad.net/bugs/1235317   :)
>>>
>>> I noticed that :)  I took a quick look at the module editor and saving a
>>> library may not be the only place where this will be a problem.  The
>>> current code attempts to determine the correct plugin by the library
>>> path using IO_MGR::GuessPluginTypeFromLibPath().
> 
> Probably no environment substitution on lib path, if you want a quick hack.
> 
> The GITHUB plugin is not useable until the stuff below is complete however, 
> and it will
> get done in any case:  The library browser needs to be based on the nickname 
> now, for
> reasons I've mentioned in the last week.


Wayne,

Attached is the full implementation of the new API functions.  We just have to 
hook them
into the UI now.

The PLUGIN is instantiated in line 465 of the patched source.

There was no need to support PLUGIN::RELEASER::operator=(), I made it private 
to get the
compiler to whine.  Plugins are instantiated lazily, at line 465.

This is what we need to keep from destroying the PLUGINs between API calls and 
destroying
our CACHE work.

Dick


=== modified file 'common/fp_lib_table.cpp'
--- common/fp_lib_table.cpp	2013-10-04 22:40:25 +
+++ common/fp_lib_table.cpp	2013-10-05 00:20:16 +
@@ -59,6 +59,46 @@
 }
 
 
+wxArrayString FP_LIB_TABLE::FootprintEnumerate( const wxString& aNickname )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->FootprintEnumerate( row->GetFullURI(), row->GetProperties() );
+}
+
+
+MODULE* FP_LIB_TABLE::FootprintLoad( const wxString& aNickname, const wxString& aFootprintName )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->FootprintLoad( row->GetFullURI(), aFootprintName, row->GetProperties() );
+}
+
+
+void FP_LIB_TABLE::FootprintSave( const wxString& aNickname, const MODULE* aFootprint )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->FootprintSave( row->GetFullURI(), aFootprint, row->GetProperties() );
+}
+
+
+void FP_LIB_TABLE::FootprintDelete( const wxString& aNickname, const wxString& aFootprintName )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->FootprintDelete( row->GetFullURI(), aFootprintName, row->GetProperties() );
+}
+
+
+bool FP_LIB_TABLE::IsFootprintLibWritable( const wxString& aNickname )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->IsFootprintLibWritable( row->GetFullURI() );
+}
+
+
 void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR )
 {
 /*
@@ -335,9 +375,9 @@
 }
 
 
-const FP_LIB_TABLE::ROW* FP_LIB_TABLE::findRow( const wxString& aNickName )
+FP_LIB_TABLE::ROW* FP_LIB_TABLE::findRow( const wxString& aNickName ) const
 {
-FP_LIB_TABLE* cur = this;
+FP_LIB_TABLE* cur = (FP_LIB_TABLE*) this;
 
 do
 {
@@ -412,7 +452,7 @@
 const FP_LIB_TABLE::ROW* FP_LIB_TABLE::FindRow( const wxString& aLibraryNickName )
 throw( IO_ERROR )
 {
-const ROW* row = findRow( aLibraryNickName );
+ROW* row = findRow( aLibraryNickName );
 
 if( !row )
 {
@@ -421,10 +461,14 @@
 THROW_IO_ERROR( msg );
 }
 
+if( !row->plugin )
+row->setPlugin( IO_MGR::PluginFind( row->type ) );
+
 return row;
 }
 
 
+/*
 PLUGIN* FP_LIB_TABLE::PluginFind( const wxString& aLibraryNickName )
 throw( IO_ERROR )
 {
@@ -436,6 +480,7 @@
 
 return plugin;
 }
+*/
 
 
 const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString aString )

=== modified file 'include/fp_lib_table.h'
--- include/fp_lib_table.h	2013-10-04 22:40:25 +
+++ include/fp_lib_table.h	2013-10-05 00:17:30 +
@@ -147,6 +147,8 @@
 description = r.description;
 properties  = r.properties ? new PROPERTIES( *r.properties ) : NULL;
 
+setPlugin( NULL );  // do not copy the PLUGIN, it is lazily created.
+
 return *this;
 }
 
@@ -258,13 +260,19 @@
 properties = aProperties;
 }
 
+void setPlugin( PLUGIN* aPlugin )
+{
+plugin.set( aPlugin );
+}
+
 wxStringnickName;
 wxStringuri;
 LIB_T   type;
 wxStringoptions;
 wxS

[Kicad-developers] [PATCH] Github plugin. FP_LIB_TABLE

2013-10-04 Thread Dick Hollenbeck
On 10/04/2013 03:41 PM, Dick Hollenbeck wrote:
> On 10/04/2013 03:30 PM, Dick Hollenbeck wrote:
>> On 10/04/2013 03:15 PM, Wayne Stambaugh wrote:
>>> On 10/4/2013 3:22 PM, Dick Hollenbeck wrote:

>
> Thank you for your amazing effort on the GitHub plugin.  I am looking
> forward to taking it for a test drive.  I hope to finish up the
> FP_LIB_TABLE code and documentation by the end of the weekend.  With all
> of the pieces in place, KiCad should have a really good footprint
> library management system.
>
> Wayne


 Thank you Wayne!

 I gave you bug https://bugs.launchpad.net/bugs/1235317   :)
>>>
>>> I noticed that :)  I took a quick look at the module editor and saving a
>>> library may not be the only place where this will be a problem.  The
>>> current code attempts to determine the correct plugin by the library
>>> path using IO_MGR::GuessPluginTypeFromLibPath().
> 
> Probably no environment substitution on lib path, if you want a quick hack.
> 
> The GITHUB plugin is not useable until the stuff below is complete however, 
> and it will
> get done in any case:  The library browser needs to be based on the nickname 
> now, for
> reasons I've mentioned in the last week.


Wayne,

Attached is the full implementation of the new API functions.  We just have to 
hook them
into the UI now.

The PLUGIN is instantiated in line 465 of the patched source.

There was no need to support PLUGIN::RELEASER::operator=(), I made it private 
to get the
compiler to whine.  Plugins are instantiated lazily, at line 465.

This is what we need to keep from destroying the PLUGINs between API calls and 
destroying
our CACHE work.

Dick


This one fixes a comment which is important to the understanding of the 
wxASSERT() in each
API function.  FP_LIB_TABLE::FindRow() does not ever return NULL, so the 
comment is was
wrong.  If it returns at all, the result is not NULL.

It also fully kills off FP_LIB_TABLE::PluginFind()



=== modified file 'common/fp_lib_table.cpp'
--- common/fp_lib_table.cpp	2013-10-04 22:40:25 +
+++ common/fp_lib_table.cpp	2013-10-05 00:20:16 +
@@ -59,6 +59,46 @@
 }
 
 
+wxArrayString FP_LIB_TABLE::FootprintEnumerate( const wxString& aNickname )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->FootprintEnumerate( row->GetFullURI(), row->GetProperties() );
+}
+
+
+MODULE* FP_LIB_TABLE::FootprintLoad( const wxString& aNickname, const wxString& aFootprintName )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->FootprintLoad( row->GetFullURI(), aFootprintName, row->GetProperties() );
+}
+
+
+void FP_LIB_TABLE::FootprintSave( const wxString& aNickname, const MODULE* aFootprint )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->FootprintSave( row->GetFullURI(), aFootprint, row->GetProperties() );
+}
+
+
+void FP_LIB_TABLE::FootprintDelete( const wxString& aNickname, const wxString& aFootprintName )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->FootprintDelete( row->GetFullURI(), aFootprintName, row->GetProperties() );
+}
+
+
+bool FP_LIB_TABLE::IsFootprintLibWritable( const wxString& aNickname )
+{
+const ROW* row = FindRow( aNickname );
+wxASSERT( (PLUGIN*) row->plugin );
+return row->plugin->IsFootprintLibWritable( row->GetFullURI() );
+}
+
+
 void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR )
 {
 /*
@@ -335,9 +375,9 @@
 }
 
 
-const FP_LIB_TABLE::ROW* FP_LIB_TABLE::findRow( const wxString& aNickName )
+FP_LIB_TABLE::ROW* FP_LIB_TABLE::findRow( const wxString& aNickName ) const
 {
-FP_LIB_TABLE* cur = this;
+FP_LIB_TABLE* cur = (FP_LIB_TABLE*) this;
 
 do
 {
@@ -412,7 +452,7 @@
 const FP_LIB_TABLE::ROW* FP_LIB_TABLE::FindRow( const wxString& aLibraryNickName )
 throw( IO_ERROR )
 {
-const ROW* row = findRow( aLibraryNickName );
+ROW* row = findRow( aLibraryNickName );
 
 if( !row )
 {
@@ -421,10 +461,14 @@
 THROW_IO_ERROR( msg );
 }
 
+if( !row->plugin )
+row->setPlugin( IO_MGR::PluginFind( row->type ) );
+
 return row;
 }
 
 
+/*
 PLUGIN* FP_LIB_TABLE::PluginFind( const wxString& aLibraryNickName )
 throw( IO_ERROR )
 {
@@ -436,6 +480,7 @@
 
 return plugin;
 }
+*/
 
 
 const wxString FP_LIB_TABLE::ExpandSubstitutions( const wxString aString )

=== modified file 'include/fp_lib_table.h'
--- include/fp_lib_table.h	2013-10-04 22:40:25 +
+++ include/fp_lib_table.h	2013-10-05 00:17:30 +
@@ -147,6 +147,8 @@
 description = r.description;
 properties  = r.properties ? new PROPERTIES( *r.properties ) : NULL;
 
+setPlugin( NULL );  // do not copy the PLUGIN, it is lazily created.
+
 return *this;
 }
 
@@ -258,13 +260,19 @@