Given a list of board types and their required quantities, this tool:
- Downloads the original bills of materials from the respective Github repositories.
- Combines the bills of materials into a single "shopping list".
- Fetches prices and availability information from the listed distributors (currently supports Farnell, RS and Mouser).
- Decides how many of each part we should order, taking into account minimum order quantities, spares, and favourable price breaks.
- Exports all of this information into a Google spreadsheet.
In the future, this will hopefully:
- Generate a costing breakdown for each board.
Check out this repo and cd to it.
python -m venv .venv
. .venv/bin/activate
pip install -e .Set up environment variables:
SB_BOMTOOL_MOUSER_API_KEY: A valid Mouser API key.SB_BOMTOOL_GOOGLE_API_CREDS: Filename of a Google APIcredentials.jsonfile (containing client ID, client secret and metadata). You can generate one on the Google Cloud Platform Console.
Execute bomtool by running:
bomtool path/to/config.yaml OUTPUT_SPECwhere currently the only valid form of OUTPUT_SPEC is googlesheet:SPREADSHEET_ID. Here, SPREADSHEET_ID should be replaced with the long alphanumeric identifier present in the URL of the spreadsheet.
For example:
bomtool configs/smallpeice2019.yaml googlesheet:1eTEkgsXN6JzumoYiGoEkO7YOBuCE3r4QvOJFlK_qb0s