From 1e1d42e062b9389a6cb7f6b2aa204758b69629e6 Mon Sep 17 00:00:00 2001 From: Andrew Majorov Date: Sun, 27 Dec 2015 23:15:16 +0300 Subject: [PATCH] Initial commit --- skin.iwsd | 37 +++++++++++++++++++++++++++++++++++++ style.isvg | 8 ++++++++ wsd.mk | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 skin.iwsd create mode 100644 style.isvg create mode 100644 wsd.mk diff --git a/skin.iwsd b/skin.iwsd new file mode 100644 index 0000000..8693193 --- /dev/null +++ b/skin.iwsd @@ -0,0 +1,37 @@ +skinparam DefaultFontName "Neucha" +skinparam BackgroundColor transparent +skinparam Shadowing false +skinparam Handwritten true + +skinparam Note { + BorderColor #303030 + BackgroundColor #CEEEFE + FontSize 12 +} + +skinparam Sequence { + TitleFontSize 12 + TitleFontColor #606060 + ArrowColor #303030 + DividerBackgroundColor #EEEEEE + GroupBackgroundColor #EEEEEE + LifeLineBackgroundColor white + LifeLineBorderColor #303030 + ParticipantBackgroundColor #FEFEFE + ParticipantBorderColor #303030 + BoxLineColor #303030 + BoxBackgroundColor #DDDDDD +} + +skinparam Title { + FontSize 12 + FontColor #606060 +} + +skinparam Activity { + ArrowColor #303030 + ArrowFontSize 10 + BarColor #F0A0A0 + BorderColor #303030 + BackgroundColor #DEEEFE +} diff --git a/style.isvg b/style.isvg new file mode 100644 index 0000000..e7f7d63 --- /dev/null +++ b/style.isvg @@ -0,0 +1,8 @@ + diff --git a/wsd.mk b/wsd.mk new file mode 100644 index 0000000..fc17452 --- /dev/null +++ b/wsd.mk @@ -0,0 +1,41 @@ +FORMAT ?= svg +SOURCES = $(wildcard ./*.wsd) +TARGETS = $(patsubst %.wsd,%.$(FORMAT),$(SOURCES)) +STYLE ?= style.isvg + +.PHONY: all clean toolset force + +all: $(TARGETS) + +clean: + rm -f $(TARGETS) + +%.svg: %.wsd + cat $< \ + | plantuml -tsvg -pipe \ + | xmllint --format - \ + | sed -e "//r $(STYLE)" \ + > $@ + @$(MAKE) FILENAME=$@ validate + +%.png: %.wsd + $(MAKE) $*.svg + mogrify -antialias -density 240 -format png $*.svg + rm -vf $*.svg + @$(MAKE) FILENAME=$@ validate + +validate: + test -s $(FILENAME) || { rm $(FILENAME); exit 1; } + +install-toolset: plantuml.tool xmllint.tool mogrify.tool +%.tool: force + $(MAKE) $*.tool.$(uname -s) +plantuml.tool.Darwin: + brew install plantuml +mogrify.tool.Darwin: + brew install imagemagick +xmllint.tool.Darwin: + true + +force: + @true