kicad-developers team mailing list archive
Mailing list archive
On 08/12/2013 10:22 AM, Chris Morgan wrote:
> On Mon, Aug 12, 2013 at 11:13 AM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
>> In looking at an http plugin for pcbnew, here are my findings so far:
>> It occurred to me that only three class PLUGIN functions seem to be necessary
>> *) IsWriteable() this is one line, "return false".
>> *) FootprintEnumerate()
>> *) FootprintLoad()
>> So basically two functions. I wrote FootprintLoad() in about 4 hours using wxHTTP,
>> complete with "redirect" handling that I added. FootprintEnumerate() is website dependent
>> since you have to parse the dir listing coming back.
>> This is a trivial amount of work, but you have something website specific that is read
>> only for ever. And that is not a terrible thing, quite useful.
>> Then and found an API at GITHUB, and formulated more thoughts about that, so what follows
>> is the formation of a work package:
>> is a marriage made in heaven for pcbnew. The only missing building block is https
>> support. We have to parse a little JSON, but this is in boost::property tree already in
>> the source tree.
>> It also gave me a better handle on the use cases of the fp lib table dialog window, which
>> now seems to require a little better support for the options column. I can envision a
>> property table two column popup dialog that lets you show the options in name value form.
>> (Also maybe an additional PLUGIN api function that returns the options that each plugin
>> knows about as fodder for this generic dialog window.) Upon return from the popup dialog,
>> you get a string in form
>> That goes back into the fp lib table dialog "options" column.
>> And of course this property dialog must parse this string upon invocation. The parser can
>> be re-used if the results go into a PROPERTIES class instance so it can also be passed to
>> the PLUGIN api functions too.
>> RE: https. I have a couple of options in mind for that, after which I am thinking we
>> could start with a read only GITHUB_PLUGIN implementation, and grow into something with
>> write capabilities down the line.
>> I need to solve the https gap in the least painful way. Possibilities I see are:
>> a) cpp-netlib which has HTTPS client, looks like it needs g++ 4.7 to compile, although
>> I've yet to verify this is the case when sub-setting it.
>> b) cherry pick libpoco, which I have used, and has HTTPS client.
>> c) add ssl support on top of wxHTTP using boost and openssl in the same way boost does it
>> for non SSL boost::ASIO sockets.
>> These are currently about equal in my mind. Note that merely having SSL sockets is not as
>> rich as having an HTTPS client, since much header and replay parsing support is need.
>> If anyone is a networking jockey and wants to work with me on this let me know. I think I
>> could and would code the read only form of the plugin in about 2 days if we had the HTTPS
>> client support in place. That is bogging me down right now, and brings the total work to
>> over 3 days, which I have to defer because of other work.
> I had seen the github api when I was putting together some of the
> ideas about the online library sharing. It looks like a lot of the
> approaches they've used could be borrowed. I presume you are referring
> to using github directly?
I was more thinking the api was suitable to
> build upon for a custom server implementation with additional commands
> to handle our application specific usage.
That is also possible if you find the development resources to do it. There are no fixed
limits on the number nor the types of pcbnew PLUGINs that get written.
If you decide to do that, *start by identifying the development resources*. In my case of
GITHUB plugin, because of past discussions that we have had on the topic, and all the work
and planning that I put into the PLUGIN API so that it COULD HANDLE REMOTE ACCESS,
*I am prepared to provide the development resources*
to do GITHUB_PLUGIN. Although if I have to also do the HTTPS client layer work, it will
not be in 2 days from now.
Having a larger code base to borrow from makes any future plugin work easier of course also.
If that does not meet your needs, then do your means analysis up front. Do not assume you
can rally the troops to donate valuable time to a large design. You end up with 200 email
messages and a piece of paper if you are lucky.
The dirty secret about open source is that the code is most always written FOR the guy or
organization writing it. It is only coincidental that it solves someone else's problem too.
I think a GITHUB plugin will serve my needs, it only looks like I am doing it for someone