Skip to content

Commit 0b63823

Browse files
committed
Added documentation in README and examples folder
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
1 parent 4594dfb commit 0b63823

File tree

4 files changed

+82
-5
lines changed

4 files changed

+82
-5
lines changed

README.md

Lines changed: 79 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,89 @@
11
# ohm schematic drawer
22

3-
## Online Demo
3+
A simple tool to draw SVG circuit schematics and similar diagrams in the browser.
4+
5+
The tool is available online:
46

57
[ohm.oleherman.com](https://ohm.oleherman.com/)
68

7-
## Run locally
9+
## Features
10+
11+
- Open source, GPLv3 license.
12+
- Completely client side - no tracking, ads, or saving of your data.
13+
- One single [`index.html`](./index.html) file, no build steps, minification, dependencies, source maps, or similar.
14+
The file can be edited directly, opened in a browser, etc.
15+
16+
## Tools
17+
18+
In the left bar there are 9 icons representing what is possible:
19+
20+
1. **Pencil:** Create lines / wires.
21+
In order to finish a drawing, click again on the last point, or close the loop.
22+
2. **Dot:** Create filled in dots, typically used to indicate that crossing wires are connected.
23+
3. **Circle:** Create circles.
24+
Often used for input / output terminals, or for other decorations.
25+
Click and drag to create bigger circles.
26+
4. **T:** Create text.
27+
Click once, start typing, then click again to place.
28+
5. **Arrows in 4 directions:** Move objects.
29+
Click once to pick something up and again to place.
30+
6. **Two squares:** Copy.
31+
Click once to select something and again to place a copy.
32+
7. **X:** Delete.
33+
Hover over objects to see what will be deleted.
34+
8. **Floppy drive:** Save / download / export as SVG.
35+
9. **Up arrow out of a box:** Load / upload / import SVG.
36+
37+
## Tips / keyboard shortcuts
38+
39+
There are some features which are only accessible via keyboard shortcuts:
40+
41+
- **Resize canvas:** Up, down, left, and right arrow keys can be used to increase / decrease the size.
42+
- **Change grid:** 1,2,3, and 4 keys can be used to change the grid size.
43+
This can help make smaller details / spaces between lines and more specific circle sizes.
44+
45+
## Non-goals
46+
47+
It can be helpful to make a focused and simple tool, thus there are some things we don't want to add:
48+
49+
- Only SVG file format is supported, other tools can be used to convert to other file formats.
50+
- Only SVGs created with ohm are supported, don't expect SVGs from other editors to be working correctly.
51+
- The tool only creates black and white diagrams, which matches the type of circuit schematics we're trying to make.
52+
You can add colors using other tools or by editing the SVG afterwards.
53+
- Any complex features needed for other types of image editing, but not for black and white circuit schematic diagrams.
54+
55+
## Examples
856

9-
Download and double click `index.html` file to open in browser.
57+
See the [examples folder](./examples) for some examples of diagrams made in this tool.
1058

11-
Or open from Mac OS X terminal:
59+
Additionally, see this other repo for schematics I made in the same style using Illustrator, before creating this tool:
1260

61+
https://github.com/olehermanse/schem
62+
63+
## Run offline / locally
64+
65+
The entire tool is self contained inside `index.html` - you can download this file and run it in your browser.
66+
67+
When this is deployed, it is running in a minimal nginx Dockerfile (just 2 lines).
68+
You can run this locally as well, with `docker`:
69+
70+
```bash
71+
docker build --tag ohm . && docker run -it -p 8000:80 --name ohm --rm ohm
1372
```
14-
open index.html
73+
74+
Or with `podman`:
75+
76+
```bash
77+
podman build --tag ohm . && podman run -it -p 8000:80 --name ohm --rm ohm
1578
```
79+
80+
Open in the browser:
81+
82+
http://127.0.0.1:8000
83+
84+
## License
85+
86+
This project is open source and licensed under the GPLv3 license.
87+
See [LICENSE](./LICENSE) for the full license.
88+
89+
Written by [@olehermanse](https://github.com/olehermanse), with design by [@PrebenAas](https://github.com/PrebenAas).

examples/3_simple_components.svg

Lines changed: 1 addition & 0 deletions
Loading

examples/cmos_inverter.svg

Lines changed: 1 addition & 0 deletions
Loading

examples/one_big_component.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)