yaqwsx / jlcparts

Better parametric search for components available for JLC PCB assembly
https://yaqwsx.github.io/jlcparts/
MIT License
572 stars 52 forks source link

Support preferred parts #104

Closed maksz42 closed 11 months ago

maksz42 commented 11 months ago

Related issue #95

yaqwsx commented 11 months ago

Thank you for opening the PR! I however dislike the approach when buildtables downloads anything. Buildtables takes a database and builds the tables. Nothing else.

Pulling the preffered components should be either part of the getlibrary command or even a separate command pullpreferred. Nevertheless, the result should be stored in the cache database where the buildtables can read it. Not only it is a cleaner solution, it will also improve the database for others that rely on it.

maksz42 commented 11 months ago

Not only it is a cleaner solution, it will also improve the database for others that rely on it.

I know, let's say it's just a proof of concept. I don't understand getlibrary enough to do it myself (and secret API keys are needed?). So feel free to close this PR and implement this properly yourself.

yaqwsx commented 11 months ago

Replaced by bb8f3311. Thank you for digging into the API and finding out the good source for data.