https://github.com/btbytes/pywsd
Python script to create UML sequence diagrams using websequencediagrams.com API.
https://github.com/btbytes/pywsd
python uml-sequence-diagram
Last synced: about 1 year ago
JSON representation
Python script to create UML sequence diagrams using websequencediagrams.com API.
- Host: GitHub
- URL: https://github.com/btbytes/pywsd
- Owner: btbytes
- Created: 2012-11-03T15:33:07.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-11-03T15:42:34.000Z (over 13 years ago)
- Last Synced: 2025-03-25T03:53:36.271Z (about 1 year ago)
- Topics: python, uml-sequence-diagram
- Language: Python
- Size: 113 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
pywsd.py
--------
This is a utility script to create UML sequence diagrams using a plain-text
notation. That is, this program converts
alice->bob: authentication request
bob-->alice: response
to

## Typical Usage
Simplest:
$ ./pywsd.py example.txt
$ ls
example.png
Something fancy:
$ ./pywsd.py example.txt -s napkin
$ ls
example.png
The sequnce diagram should look like something you drew on a napkin.
Note: `./pywsd.py -h` for a list of available styles.
If you want to get rid of the water marking at the bottom, use `convert`:
$ convert example.png -gravity South -chop 0x14 example.png
With a `Makefile` (because makefiles rock):
SOURCES = $(wildcard *.txt)
INTER = $(patsubst %.txt, %.png1, $(SOURCES))
PNGS = $(patsubst %.txt, %.png, $(SOURCES))
all: $(PNGS)
%.png1: %.txt
./pywsd.py $< -o $@
%.png: %.png1
convert $< -gravity South -chop 0x14 $@
clean:
rm -f $(INTER)
clean-all:
rm -f $(PNGS)
.PHONY: clean-all
Thanks to [WebSequnceDiagrams.com](http://www.websequencediagrams.com/) for making such a handy and intuitive tool available for free on the web.