Skip to content

Commit b5cc4f4

Browse files
committed
Initial commit
1 parent e6fb16c commit b5cc4f4

4 files changed

Lines changed: 97 additions & 2 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Generate Sankey Diagram
2+
3+
on:
4+
push:
5+
paths:
6+
- sankey.txt
7+
- src/sankey-settings.txt
8+
workflow_dispatch:
9+
10+
jobs:
11+
generate-sankey:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
- name: Generate sankey diagram
19+
run: |
20+
cat src/sankey-settings.txt >> sankey.txt
21+
response=$(curl -s -X POST --data-binary @sankey.txt https://sankey.nicoo.org)
22+
echo "$response" > src/sankey.svg
23+
24+
- name: Commit and push sankey diagram
25+
run: |
26+
git config --global user.name 'github-actions[bot]'
27+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
28+
git add src/sankey.svg
29+
git commit -m 'Updated sankey diagram'
30+
git push

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# sankey-as-code
2-
SankeyMATIC-as-Code
1+
# Budget Planning
2+
3+
![Sankey Diagram](src/sankey.svg)

sankey.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Wages [1500] Budget
2+
Other [250] Budget
3+
4+
Budget [450] Taxes
5+
Budget [420] Housing
6+
Budget [400] Food
7+
Budget [295] Transportation
8+
Budget [35] Other Necessities
9+
Budget [150] Savings

src/sankey-settings.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
3+
// === Settings ===
4+
5+
size w 600
6+
h 600
7+
margin l 0
8+
r 0
9+
t 0
10+
b 0
11+
bg color #ffffff
12+
transparent Y
13+
node w 5
14+
h 31
15+
spacing 82
16+
border 0
17+
theme a
18+
color #888888
19+
opacity 1
20+
flow curvature 0.42
21+
inheritfrom target
22+
color #999999
23+
opacity 0.5
24+
layout order automatic
25+
justifyorigins N
26+
justifyends Y
27+
reversegraph N
28+
attachincompletesto nearest
29+
labels color #000000
30+
hide N
31+
highlight 0
32+
fontface sans-serif
33+
linespacing 0
34+
relativesize 100
35+
magnify 100
36+
labelname appears Y
37+
size 14
38+
weight 400
39+
labelvalue appears Y
40+
fullprecision Y
41+
position before
42+
weight 700
43+
labelposition autoalign 0
44+
scheme per_stage
45+
first after
46+
breakpoint 4
47+
value format '.,'
48+
prefix ''
49+
suffix ' €'
50+
themeoffset a 9
51+
b 0
52+
c 0
53+
d 0
54+
meta mentionsankeymatic N
55+
listimbalances Y

0 commit comments

Comments
 (0)