Specify spreadsheet currency
See original GitHub issueFrom the looks of the documentation and --help output, it doesn’t seem possible to target region-specific supplier websites—this makes kicost
more or less only useful to those operating in the US out-of-the-box, as the USD costs don’t necessarily reflect the cost from the same supplier elsewhere and in other currencies.
Would it be possible to add as an enhancement the ability to specify a country/region, e.g. using digikey.ca instead of digikey.com, either globally or on a per-supplier basis?
I’m not sure how consistently these region-specific sites are defined across suppliers—it seems they are generally listed exhaustively (DigiKey Mouser), so it might be possible to allow the user to specify just their TLD and keep a mapping of TLD to URL in each supplier’s module. Alternatively, just let users specify the specific site variant they want for each supplier, and alter the TLD or subdomain as appropriate.
(For now I’m explicitly altering the source of a local copy - not the cleanest workaround!)
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (12 by maintainers)
Top GitHub Comments
Using the Octopart API comes up a lot. Here are some problems with it:
Mouser and Digikey also have their own APIs. Digikey required a user ID to access it; Mouser didn’t but restricted the pricing data to purchase quantities of 1 and 10. And there were other restrictions the last time I checked. Then there are all the other distributors that don’t have a public API at all.
Web-scraping was the only approach I found in 2015 that avoided all these problems and made KiCost easy to install and use. Before going down the API route, someone will have to go through all the available APIs and determine what their current restrictions are and how they impact on getting costs and other data from the distributors. Then you can make an informed decision about which way to go.
#275 give us one step forward to Mouser country/currency configuration.