Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 6279b01

Browse files
committed
doc: add netlistsvg installation instructions
TEST=make doc Issue #26
1 parent 26ed798 commit 6279b01

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed

CONTRIBUTING.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Developing PCBDL
22

3-
This command will setup the development enviroment so it will be eaasy to make changes to PCBDL:
3+
This command will setup the development enviroment so it will be easy to make changes to PCBDL:
44
```bash
55
sudo pip3 install -r requirements.txt
66
```
77

8+
You probably also want to [install netlistsvg](https://google.github.io/pcbdl/doc/_build/html/netlistsvg.html#installation).
9+
810
## Tests
911

1012
To test pcbdl framework functionality (not the schematics themselves), one can run:

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ Here's an example of such a [html output for servo micro](https://google.github.
142142

143143
### Schematics / Graphical representation of the circuit
144144

145-
In order for schematics to be more easily parsable, we want to graphically display them. The [netlistsvg](https://github.com/nturley/netlistsvg) project has been proven to be an excellent tool to solve the hard problems of this. See `pcbdl/netlistsvg.py` for the implementation.
145+
In order for schematics to be more easily parsable, we want to graphically display them.
146+
The [netlistsvg](https://github.com/nturley/netlistsvg) project has been proven to be an excellent tool to solve the hard problems of this. See `pcbdl/netlistsvg.py` for the implementation.
147+
To use the following commands you'll have to [install netlistsvg](https://google.github.io/pcbdl/doc/_build/html/netlistsvg.html#installation).
146148

147149
1. Convert a pcbdl schematic back into a traditional schematic
148150
```python

doc/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ PCBDL Documentation
77

88
readme
99
contributing
10+
netlistsvg
11+
1012
api
1113
small_parts

doc/netlistsvg.rst

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
NetlistSVG
2+
==========
3+
4+
Introduction
5+
------------
6+
`netlistsvg <https://github.com/nturley/netlistsvg>`_ is used by pcbdl to render a graphical output of the schematics.
7+
8+
It uses the "analog skin" to get something similar to what an engineer would draw for a board/pcb level design:
9+
10+
.. figure:: https://raw.githubusercontent.com/nturley/netlistsvg/master/doc/and.svg?sanitize=true
11+
12+
Netlistsvg's Analog Example
13+
(TODO: replace drawing with a compact pcbdl example)
14+
15+
16+
Installation
17+
------------
18+
19+
netlistsvg is written in javascript, to run it one needs both nodejs or npm.
20+
For debian style systems the following should do:
21+
22+
.. code-block:: bash
23+
24+
sudo apt install nodejs npm
25+
26+
One should plan for a location to install netlisvg, I recomend next to the pcbdl folder.
27+
28+
I recommend grabbing the https://github.com/amstan/netlistsvg/tree/for-pcbdl branch.
29+
It has a few tweaks that make netlistsvg outputs so much better, but the changes still need to be
30+
merged with the upstream project.
31+
32+
.. code-block:: bash
33+
34+
git clone -b for-pcbdl https://github.com/amstan/netlistsvg.git
35+
36+
Then it can be installed with npm:
37+
38+
.. code-block:: bash
39+
40+
cd netlistsvg
41+
npm install .
42+
43+
Finally pcbdl neets to be told where netlistsvg is, this is done using an `env variable <https://en.wikipedia.org/wiki/Environment_variable>`_.
44+
The default is assumed to be `~/netlistsvg`. The following can be added to .bashrc or where the user normally stores env variables::
45+
46+
export NETLISTSVG_LOCATION=~/path/to/installed/netlistsvg
47+
48+
It can be tested by running :code:`make gh-pages` in `pcbdl/`, a bunch of `.svg` files will be created in `examples/`.

0 commit comments

Comments
 (0)