pinout diagram library using Python and drawsvg
A heavily reworked fork of pinout-overview into a library by stripping out all parts unrelated to the pinout and legend objects themselves.
Note: At this point documentation is more conceptual than literal. See dx-pinouts repository for a working example. The library docstrings are fairly helpful.
Uses the DrawSVG library for drawing the svg elements
mkdir <project-master>
cd <project-master>
python -m venv --prompt <my-prompt> venv
source venv/bin/activate
git clone github.com/coburnw/pinout-overview
cd pinout-overview
git checkout lib
pip install --editable .
Subclass the following:
- Function() Create a subclass for each function that may be displayed in a pinout.
Override any style attributes to customise the functions visual, and any exposed methods to parse the format of the source data. - Pinmap() A mapping of pin numbers to Pad objects.
Add a method to parse the source data, instantiating a Function object for each, and appending to the proper Pad. - Package() messy
instantiate a Pinmap, parse the device data for pad/function relationships and append.
parse the device data for package shapes and pincounts and instantiate a Package.
Choose a layout: 'horizontal', 'diagonal' or 'orthogonal', instantiate a Pinout(layout, package, pinmap) object and place
Choose a layout: 'horizontal' or 'vertical' instantiate a Legend(layout, pinmap) object and place
- Adds simplistic knowledge of a regions size and position. Since Pinout and Legend are derived from Region the application can use their 'width', 'height', 'x' and 'y' attributes to dynamically help with size and placement of other items on the page.
- The primary visual effect of interest. A container for a functions data to be visually represented on a page ultimately associated with some pin.
- rarely needed by the library user.
- rarely needed by the library user.
- The pad name list must be in order and without any missing pins.
- This should be moved to a package subclass
- QFP, QFN, or SOP
- layout (str): 'horizontal', 'diagonal', or 'orthogonal'
- pinmap (Pinmap): an initialized Pinmap object
- package (Package): an initialized Package object
- layout (str): Vertical or Horizontal
- pinmap (Pinmap):
There are no config files. Configuration is done by subclassing and overriding.
The size of the function label determines the scale of many of the objects. Override the functions width and height attributes.
-
legend
-
merge changes to qfp and sop packages
-
add split option
-
handle quadrant text internally rather than asking the browser to render it
-
expand on label size for object scaling
-
Error checking
-
Documentation
-
Improve modularity to allow for more complex footprints