Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ubuntu:bionic
RUN apt-get update -y
# Timezone configuration is required to avoid tzdata interuption while installing packages.
ENV TZ=Asia/Jakarta
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get -y install software-properties-common build-essential python-dev python-pip git unzip
RUN add-apt-repository ppa:freecad-maintainers/freecad-daily
RUN apt-get update -y
RUN apt install -y freecad
COPY . .
RUN pip install -r requirements.txt
CMD [ "./kb_builder.py" ]
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kb_builder

**NOTE: The CAD engine (KAD) which powers the current [builder.swillkb.com](http://builder.swillkb.com) builder has been open sourced and is available here [github.com/swill/kad](https://github.com/swill/kad). Enjoy...**

`kb_builder` is the original engine that ran [builder.swillkb.com](http://builder.swillkb.com). That service has been completely rewritten in Golang, but this project is still a useful environment to hack on.
`kb_builder` is the original engine that ran [builder.swillkb.com](http://builder.swillkb.com). That service has been completely rewritten in Golang, but this project is still a useful environment to hack on.

This tool uses the JSON layout generated by the [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/). There are a lot of hidden features that you can do when building plates. Check the `?` next to the `Plate Layout` text field in the UI for more details.

Expand Down Expand Up @@ -90,14 +90,14 @@ $ cd ~/
$ sudo freecad
# 'sudo' so it creates the correct '/root/.FreeCAD' directory
# note the version number
# download the appropriate version from here:
# download the appropriate version from here:
# https://github.com/yorikvanhavre/Draft-dxf-importer
# i will assume freecad version v16 and the latest importer (v15)
$ wget https://github.com/yorikvanhavre/Draft-dxf-importer/archive/1.38.zip
$ unzip 1.38.zip
# this will create the 'Draft-dxf-importer-1.38/' directory
$ cp Draft-dxf-importer-1.38/* /root/.FreeCAD/
# Note: we are putting this import into the 'root' users '.FreeCAD'
# Note: we are putting this import into the 'root' users '.FreeCAD'
# not your users because we are running with 'sudo'
```

Expand All @@ -108,6 +108,12 @@ $ cp Draft-dxf-importer-1.38/* /root/.FreeCAD/
$ cd ~/kb_builder && sudo ./kb_builder.py
```

### Docker

```
$ docker build -t swillkb .
$ docker run -p 8000:80 swillkb
```

## License

Expand Down