Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display "extra" component data by the distributor #4

Open
xesscorp opened this issue Sep 30, 2015 · 6 comments
Open

Display "extra" component data by the distributor #4

xesscorp opened this issue Sep 30, 2015 · 6 comments
Labels
feature-request New features resquested.
Milestone

Comments

@xesscorp
Copy link
Collaborator

For "extra data" information, xlsx could display some distributor site return data (value, tolerance, footprint/package, etc) which doesn't necessarily care about a match to the component data. Although maybe cares about consistency or a fuzzy match between distributors (mouser, digikey, Newark)

Which, if doing that, begs for a template file (text file) to setup which fields to display as "extra data". Maybe instead of relying on fuzzy matching to have the setup file also prioritize which site "wins" if information exists. Example: setup file wants two "extra data" fields and perhaps denotes them as:

$extra1=mouser,"tolerance",digikey,"tolerances",Newark,"tol:";$extra2=digikey,"package"

Example shows two extra fields. First field will fill in with a match on part html line with "tolerance" match. If no match, then try Digikey a match for "tolerances" (showing maybe different search strings for different distributors), if no match then try Newark a line with "tol:". The 2nd extra field only matches if digikey returns a field with "package". How the script decides what the value is to return (presumably data to the right of the search string) - how much to return (and when to terminate) may not be worth deciding so there may need to be a third field which tells the script how to determine. $extra1=mouser,"tolerance","regex? Something else",digikey,"tolerances","dk value parse helper", Newark."tol:."newark parser helper"

Not settled on the parser helper field - but that it could help the script abstract how to determine the value return format.

@xesscorp xesscorp added the feature-request New features resquested. label Dec 3, 2015
@hildogjr
Copy link
Owner

hildogjr commented Dec 28, 2017

Related #78 (Add datasheet link), #91 (Show part image)
It will be used in #2 (Part value auditing)

All issues above as grouped here and closed.

It will be need some modification and study of the distributors sub modules to create a extra_info output as a dict() that could be used to other proposes (show as balloon tip in spreadsheet, check values, ...).
Propose:

  • Create a definition in web_routines.py (need file of my last pull request) in distributors folder: `EXTRA_INFO = ['value', 'tolerance', 'footprint', 'power', 'current', 'voltage', 'frequency', 'temp_coeff', 'manf']
  • A function that return in each distributor website a dict() with these keys above (if founded) filed (or None or not present).

After this, in the spreadsheet, some of they could be see as a comment in each "cat#" column. Save the differences got in each distributor could help in #17 implementation.

@hildogjr hildogjr changed the title Display "extra" component data Display "extra" component data by the distributor Jan 2, 2018
hildogjr added a commit that referenced this issue Jan 31, 2018
hildogjr added a commit that referenced this issue Mar 24, 2018
Fix #4 (prototype on digikey)
@hildogjr
Copy link
Owner

hildogjr commented Mar 24, 2018

Prototype for Digikey but ready for all others distributors:
Need to be implemented the function get_extra_info(html_tree) inside them. Use the library from .. import EXTRA_INFO_DIST, extra_info_dist_name_translations and update the extra_info_name_translations dict inside each distributor submodule code or create your on translate method, avoid to change extra_info_name_translations on __init.py__.

On a phase two, this data could be used to check footprint and other data and paint the cell of one distributor as a warning.

Feel free to contribute.

@hildogjr hildogjr reopened this Mar 24, 2018
@hildogjr hildogjr self-assigned this Mar 25, 2018
hildogjr added a commit that referenced this issue Mar 27, 2018
hildogjr added a commit that referenced this issue Mar 27, 2018
@hildogjr hildogjr removed their assignment Jun 7, 2018
@hildogjr
Copy link
Owner

hildogjr commented Jun 7, 2018

Missing implement on others distributors, use my code Digikey as example/model.

@hildogjr hildogjr self-assigned this Jul 4, 2018
@hildogjr hildogjr removed their assignment Sep 3, 2018
@hildogjr
Copy link
Owner

hildogjr commented Oct 7, 2018

USinf #295, @xesscorp , would be interesting to add the life cycle (I intend to use some highlight in the spreadsheet if not recommended to new designs) and datasheet to complete that parts that doesn't have one.

@hildogjr hildogjr self-assigned this Oct 17, 2018
@hildogjr
Copy link
Owner

Actually use the life cycle and datasheet to complete and highlight the manf# cell code.
New information could be added in the future if available by the web distributors (now APIs) and a cross-checking could be implemented.

I will leave this opened for now until I study if is possible this cross checking.

@hildogjr
Copy link
Owner

hildogjr commented Nov 6, 2018

If this word parse https://kitspace.github.io/electro-grammar/ should be possible to validate.

@hildogjr hildogjr added this to the 2.1 milestone May 3, 2019
@hildogjr hildogjr removed their assignment May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New features resquested.
Projects
None yet
Development

No branches or pull requests

2 participants