Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sky-joker/wrapdraw
This tool automatically renders and download a network diagram from drawthe
https://github.com/sky-joker/wrapdraw
diagram drawthe network python
Last synced: about 2 months ago
JSON representation
This tool automatically renders and download a network diagram from drawthe
- Host: GitHub
- URL: https://github.com/sky-joker/wrapdraw
- Owner: sky-joker
- License: mit
- Created: 2020-09-30T15:10:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-03T12:25:48.000Z (over 4 years ago)
- Last Synced: 2024-04-16T00:14:10.591Z (9 months ago)
- Topics: diagram, drawthe, network, python
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# wrapdraw
[![](https://img.shields.io/github/license/sky-joker/wrapdraw?style=for-the-badge)](https://github.com/sky-joker/wrapdraw/blob/master/LICENSE.txt)
[![](https://img.shields.io/docker/image-size/skyjokerxx/wrapdraw?sort=date&style=for-the-badge)](https://hub.docker.com/r/skyjokerxx/wrapdraw)This tool can automatically render and download a network diagram from [drawthe](https://github.com/cidrblock/drawthe.net).
## Requirements
* Python >= 3.6
## Usage
You can do to start the wrapdraw container the following procedure.
**If using docker**
```
# docker run -itd --name wrapdraw --rm skyjokerxx/wrapdraw:latest
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bd550e0bb9e6 skyjokerxx/wrapdraw:latest "/bin/sh -c 'pytho..." 38 seconds ago Up 37 seconds wrapdraw
```**If using podman**
```
# podman run -itd --name wrapdraw --rm skyjokerxx/wrapdraw:latest
# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3138419da952 docker.io/skyjokerxx/wrapdraw:latest /bin/sh -c python... 30 seconds ago Up 29 seconds ago wrapdraw
```**The example of when using Ansible**
Please see the following sample.
[https://github.com/sky-joker/wrapdraw/tree/master/sample/ansible](https://github.com/sky-joker/wrapdraw/tree/master/sample/ansible)
## Environment variable
The following environment variables are available to set when starting a container.
| env | default | description |
|--------------------|-------------------------------------------------------------------------|---------------------------------------|
| URL | http://go.drawthe.net/ | URL of drawthe to use |
| UPLOAD_FOLDER | upload | A save path of a YAML file uploaded |
| SAVE_FOLDER | save | A save path of an NW diagram rendered |
| DRIVER_PATH | /usr/local/lib/python3.6/site-packages/chromedriver_binary/chromedriver | A save path of chromedriver |
| CHROME_WINDOW_SIZE | 1920,1080 | Window size of Google Chrome |
| LISTEN_PORT | 8080 | The app listen port |If you want to use locally constructed drawthe, set the URL environment the following procedure.
```
# docker run -itd --name wrapdraw --rm -e URL='http://172.17.0.3' skyjokerxx/wrapdraw:latest
```If you felt the NW diagram small, you can change its size the following procedure.
```
# docker run -itd --name wrapdraw --rm -e CHROME_WINDOW_SIZE='2560,2048' skyjokerxx/wrapdraw:latest
```## License
[MIT](https://github.com/sky-joker/wrapdraw/blob/master/LICENSE.txt)