wtg

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 10 Imported by: 0

README

Quick start

Given sample.txt with this content

business - cup of tea
public - cup of tea
cup of tea - cup
cup of tea -- tea
cup of tea --- hot water
hot water - water
hot water -- kettle
kettle - power

cup of tea: {
    type: buy
    evolution: |....|....|...x..|.........|
}
water: {
    type: build
    evolution: |....|....|....|....x....|
}
kettle: {
    type: build
    evolution: |....|..x.|....|.........|
}
power: {
    type: outsource
    evolution: |....|....|....x|.........|
}
business: {
    evolution: |....|....|..x.|.......|
}
public: {
    evolution: |....|....|....|.x....|
}
cup: {
    evolution: |....|....|....|.x.......|
}
tea: {
    evolution: |....|....|....|..x......|
}
hot water: {
    evolution: |....|....|....|...x.....|
}

When we execute

cat sample.txt | go run cmd/wtg2svg/main.go > sample.svg

The result is

Howto

First create the value chain

Create your value chain simply in a file (for example vc.txt)

business - cup of tea
public - cup of tea
cup of tea - cup
cup of tea -- tea
cup of tea --- hot water
hot water - water
hot water -- kettle
kettle - power
Test the value chain in dot

cat vc.txt | go run cmd/wtg2dot/main.go | dot -Tsvg > vc_dot.svg

which renders in

Test the value chain in maps

cat vc.txt | go run cmd/wtg2svg/main.go > vc_wardley.svg

which renders in

Create the evolution file

You can use the dump command to generate some boilerplate for the components:

cat vc.txt | go run cmd/dump/main.go | while read line
do
echo "$line: {"
echo "    evolution: |....|....|....|....x....|"
echo "}"
done > evolution.txt

Then adapt the file

Generate the maps

cat vc.txt evolution.txt | go run cmd/wtg2svg/main.go > map.svg

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	WMap *wardleyToGo.Map
	// contains filtered or unexported fields
}

func NewParser

func NewParser() *Parser

func (*Parser) DumpComponents

func (p *Parser) DumpComponents(w io.Writer)

func (*Parser) Parse

func (p *Parser) Parse(r io.Reader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL