$ virtualenv --prompt '|> odbt <| ' env
$ pip install -r requirements.txt
$ setup.py develop
ODBT is a CLI application which can be used from the command line.
You need to setup an Altium DBLib structure + database. Furthermore you request an Octopart or Digi-Key API key.
The required directory structure is shown below:
Components\
Capacitors\
Datasheets\
Capacitors.PcbLib
Capacitors.SchLib
...
Resistors\
Database.mdb
Database.DbLib
For previewing links and datasheets Google Chrome is required.
Before you can use the application you need to setup the config file in the config directory.
You can copy odbt.yml.samle
to odbt.yml
and edit the file to match your setup.
- You will need to obtain an API key from Octopart and need to enter it
in the configuration under
odbt -> octopart_api_key
. - You will need to enter a path to the database given in the section above under
odbt -> db_path
asC:\Path\To\Directory\Structure\Database.mdb
Activate your virtual environment (See development section for creating one):
$ source env/bin/activate
And run the application:
### run odbt cli application
$ odbt --help
usage: odbt [-h] [-d] [-q] [-v] {table,item,config} ...
Use Octopart to update and add componenta to an Altium DBlib
optional arguments:
-h, --help show this help message and exit
-d, --debug full application debug mode
-q, --quiet suppress all console output
-v, --version show program's version number and exit
sub-commands:
{table,item,config}
table table controller
item item controller
config config controller
Usage: odbt [command]
This project includes a number of helpers in the Makefile
to streamline common development tasks.
The following demonstrates setting up and working with a development environment:
### create a virtualenv for development
$ make virtualenv
$ source env/bin/activate
### run odbt cli application
$ odbt --help
### run pytest / coverage
$ make test
- Script to create a default empty database including file paths
- Handle thrown errors
- Functional testing