← Back to team overview

kicad-developers team mailing list archive

Re: Fwd: Python plugin for pcbnew

 

> At the beginning, I had take a look at the github plugin. This plugin is
> realy good but it does not allow (as I understand) to work
> with an other server than github.


The GITHUB_PLUGIN does some hardcoded cheating to bypass one "https redirect".  Given one
URL it modifies it to avoid having to do 2 https hits.

If you were to remove that hardcoded cheating, you'd have a plugin that could point to any
server which could return a *.zip file containing pretty footprints, using the https
protocol

Switching to http protocol is falling down easy, maybe a single character edit on another
line within the code.

So no, the GITHUB_PLUGIN is not tied to github in an intimate way, NOT AT ALL.

Remember that you can either point to a different URI using a modified fp_lib_table entry,
or by using an environment variable.

If you can find a general purpose way to "un-github" the plugin, by supplying some options
to it, go ahead.  These could be "existence is sufficient" booleans, needing no value.
Such as "NOT_GITHUB"  meaning skip the hardcoded redirect logic when present.

You could also make sure that the protocol comes from the URI, and is capable of being
http: in addition to https:.

Those two modifications I would commit, and it would allow you to use it with any server.


Dick





References