0.0.0 • Published 5 years ago

akiha-board v0.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

Akiha-board

Akiha-board draws printed wiring board pattern by ASCII-art.

How to use

Node.js

Install Akiha-board:

npm install -g akiha-board

To obtain a SVG file of printed wiring board pattern, you type the below command.

akiha-board [--option=value ...] akiha-board-file

The options are avaibale described later.

Browser

Write this HTML fragment in your HTML file.

<script src="akiha-board.js"></script>

To output printed wiring board pattern, you surround the source of the pattern in script tag whose type attribute is text/x-akiha-board.

Element

Akiha-board has the elements shown as follows.

ElementDescription
| or -wire
onode
p or qnode; if the nodes is neighbored, the nodes will be shorted
+branch of wire
#fill the box
*fill the box and branches the wires

Option

You can specify options by writing the line which begins ;#option=value. The value is optional. If you do not specify the value, the value true is specified.

OptionDescription
dpidot per inch
lineWidthwidth of wire by inch
outerRadiusradius of outer node by inch
innerRadiusradius of inner node by inch
positiveoutput positive pattern
negativeoutput negative pattern

Example

Input:

;#positive
############
#*##########
 |        ##
 +-----+  ##
 | +-+ |  ##
 ooooooo  ##
          ##
          ##
 opppppo--*#
 +-----+  ##

Output:

svg