Skip to content

Commit

Permalink
Change labels go go in MD tables
Browse files Browse the repository at this point in the history
  • Loading branch information
hyakuhei committed Dec 28, 2021
1 parent 336c377 commit 957f1be
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 27 deletions.
14 changes: 7 additions & 7 deletions examples/output/User buys book.dot
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ compound=true;
node12 [label="Database" shape="box", margin="0.1", color="Grey"];
}
}
node6->node4 [label="1 POST /buy?bookid=3" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node8 [label="2 User X buys book3" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node8->node10 [label="3 Start picking book3 for customer X" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node10->node12 [label="4 Get address for customer X" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node12->node10 [label="5 Customer address" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node10->node13 [label="6 Prepare invoice for shipping to address" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node13->node14 [label="7 Ship Order" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node6->node4 [label="1." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node8 [label="2." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node8->node10 [label="3." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node10->node12 [label="4." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node12->node10 [label="5." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node10->node13 [label="6." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node13->node14 [label="7." fontsize="10",penwidth="1.2",arrowsize="0.8"];
}
Binary file modified examples/output/User buys book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions examples/output/User lists books.dot
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ compound=true;
node8 [label="Database" shape="box", margin="0.1", color="Grey"];
}
}
node6->node4 [label="1 GET /books" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node8 [label="2 All book titles" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node8->node4 [label="3 Titles" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node6 [label="4 Books" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node6->node4 [label="1." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node8 [label="2." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node8->node4 [label="3." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node6 [label="4." fontsize="10",penwidth="1.2",arrowsize="0.8"];
}
Binary file modified examples/output/User lists books.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions examples/output/User login.dot
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ compound=true;
node8 [label="GoogleOauth" shape="box", margin="0.1", color="Grey"];
}
}
node6->node4 [label="1 GET /login" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node6 [label="2 302 Google Oauth" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node6->node8 [label="3 Request Token" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node8->node6 [label="4 Token" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node6->node4 [label="5 Token" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node6 [label="6 Cookie" fontsize="10",penwidth="1.2",arrowsize="0.8"];
node6->node4 [label="1." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node6 [label="2." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node6->node8 [label="3." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node8->node6 [label="4." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node6->node4 [label="5." fontsize="10",penwidth="1.2",arrowsize="0.8"];
node4->node6 [label="6." fontsize="10",penwidth="1.2",arrowsize="0.8"];
}
Binary file modified examples/output/User login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions examples/report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## High Level Architecture
![High Level Architecture](output/High%20Level%20Architecture.png)
## User lists books
![User lists books](output/User%20lists%20books.png)
| Id | From | To | Data |
Expand Down Expand Up @@ -27,5 +29,3 @@
| 5 | Database | Warehouse | Customer address |
| 6 | Warehouse | Shipping | Prepare invoice for shipping to address |
| 7 | Shipping | DHL | Ship Order |
## High Level Architecture
![High Level Architecture](output/High%20Level%20Architecture.png)
11 changes: 3 additions & 8 deletions src/jtg.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ def genGraph(doc, sceneName, compoundLinks=False, linkCounters=True, printLabels
drawnActors = {}
linkCounter = 0

# Left over from GvGen - need to implement some type of stying.
# graph.styleAppend("Boundary", "color", "red")
# graph.styleAppend("Actor", "shape", "box")
# graph.styleAppend("Flow", "fontsize", 10)

_STYLES = {
'boundary':'color="Red"',
'node':'shape="Box"',
Expand Down Expand Up @@ -68,7 +63,7 @@ def genGraph(doc, sceneName, compoundLinks=False, linkCounters=True, printLabels

linkCounter += 1

flowLabel = ""
flowLabel = "WAA"
if linkCounters == True:
flowLabel = f"{linkCounter}."

Expand Down Expand Up @@ -97,7 +92,7 @@ def addArchScene(doc):
for f in archFlows: # f is a tuple (from, to)
d[ARCH].append({"from": f[0], "to": f[1], "data": ""})

doc["scenes"].append(d)
doc["scenes"].insert(0, d)
return doc


Expand All @@ -119,9 +114,9 @@ def main(generateArchDiagram=True, markdown=False, printLabels=False):
doc = prepDoc(doc)
graph = None

scenes = doc['scenes']
if generateArchDiagram == True: # TODO: Make this a command line argument
doc = addArchScene(doc) # adds an ARCH scene to the doc
doc["scenes"] # Arch scene is just all of the existing scenes, bundled into one big one and run with compoundLinks

for scene in doc["scenes"]:
for sceneName in scene.keys():
Expand Down

0 comments on commit 957f1be

Please sign in to comment.