Git Product home page Git Product logo

odbt's Introduction

Use Octopart to update and add components to an Altium DBlib

Installation

$ virtualenv --prompt '|> odbt <| ' env
$ pip install -r requirements.txt
$ setup.py develop

Usage

ODBT is a CLI application which can be used from the command line.

Requirements

You need to setup an Altium DBLib structure + database. Furthermore you request an Octopart API key.

The required directory structure is shown below:

Components\
    Capacitors\
        Datasheets\
        Capacitors.PcbLib
        Capacitors.SchLib
    ...
    Resistors\
Database.mdb
Database.DbLib

Configuration

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 as C:\Path\To\Directory\Structure\Database.mdb

Running

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]

Development

This project includes a number of helpers in the Makefile to streamline common development tasks.

Environment Setup

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

TODO

  • Script to create a default empty database including file paths
  • Handle thrown errors
  • Functional testing

odbt's People

Contributors

peeter123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.