Merge branch 'master' into bernie/export-png

This commit is contained in:
Bernard Xie 2022-11-17 13:04:04 -08:00
commit d332b2e7d6
No known key found for this signature in database
GPG key ID: 3C3E0036CE0F892C
6 changed files with 520 additions and 8 deletions

View file

@ -181,8 +181,14 @@ install() {
if [ -n "${TALA-}" ]; then if [ -n "${TALA-}" ]; then
log "tala-$TALA_VERSION-$OS-$ARCH has been successfully installed into $PREFIX" log "tala-$TALA_VERSION-$OS-$ARCH has been successfully installed into $PREFIX"
fi fi
log "Rerun this install script with --uninstall to uninstall"
if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then
logcat >&2 <<EOF logcat >&2 <<EOF
%%%%%%%%%%%%%%%%%%%%%%%%%
NEXT STEPS
%%%%%%%%%%%%%%%%%%%%%%%%%
Extend your \$PATH to use d2: Extend your \$PATH to use d2:
export PATH=$PREFIX/bin:\$PATH export PATH=$PREFIX/bin:\$PATH
Then run: Then run:
@ -207,8 +213,11 @@ EOF
log " Run man d2plugin-tala for detailed docs." log " Run man d2plugin-tala for detailed docs."
fi fi
fi fi
logcat >&2 <<EOF
log "Rerun the install script with --uninstall to uninstall" Something not working? Please let us know:
https://github.com/terrastruct/d2/issues/new
EOF
} }
install_d2() { install_d2() {
@ -309,7 +318,7 @@ uninstall_standalone_d2() {
if [ ! -e "$INSTALL_DIR/d2-$INSTALLED_VERSION" ]; then if [ ! -e "$INSTALL_DIR/d2-$INSTALLED_VERSION" ]; then
warn "missing standalone install release directory $INSTALL_DIR/d2-$INSTALLED_VERSION" warn "missing standalone install release directory $INSTALL_DIR/d2-$INSTALLED_VERSION"
warn "d2 have been installed via some other installation method." warn "d2 must have been installed via some other installation method."
return 1 return 1
fi fi
@ -332,7 +341,7 @@ uninstall_standalone_tala() {
if [ ! -e "$INSTALL_DIR/tala-$INSTALLED_VERSION" ]; then if [ ! -e "$INSTALL_DIR/tala-$INSTALLED_VERSION" ]; then
warn "missing standalone install release directory $INSTALL_DIR/tala-$INSTALLED_VERSION" warn "missing standalone install release directory $INSTALL_DIR/tala-$INSTALLED_VERSION"
warn "tala have been installed via some other installation method." warn "tala must have been installed via some other installation method."
return 1 return 1
fi fi

View file

@ -0,0 +1,215 @@
{
"name": "",
"shapes": [
{
"id": "container",
"type": "",
"pos": {
"x": 0,
"y": 0
},
"width": 255,
"height": 452,
"level": 1,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "#E3E9FD",
"stroke": "#0D32B2",
"shadow": false,
"3d": false,
"multiple": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"fields": null,
"methods": null,
"columns": null,
"label": "container",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
"color": "#0A0F25",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 117,
"labelHeight": 41,
"labelPosition": "INSIDE_TOP_CENTER"
},
{
"id": "container.first",
"type": "",
"pos": {
"x": 60,
"y": 50
},
"width": 135,
"height": 126,
"level": 2,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "#EDF0FD",
"stroke": "#0D32B2",
"shadow": false,
"3d": false,
"multiple": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"fields": null,
"methods": null,
"columns": null,
"label": "first",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "#0A0F25",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 35,
"labelHeight": 26,
"labelPosition": "INSIDE_MIDDLE_CENTER"
},
{
"id": "container.second",
"type": "",
"pos": {
"x": 50,
"y": 276
},
"width": 155,
"height": 126,
"level": 2,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "#EDF0FD",
"stroke": "#0D32B2",
"shadow": false,
"3d": false,
"multiple": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"fields": null,
"methods": null,
"columns": null,
"label": "second",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "#0A0F25",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 55,
"labelHeight": 26,
"labelPosition": "INSIDE_MIDDLE_CENTER"
}
],
"connections": [
{
"id": "container.(first -> second)[0]",
"src": "container.first",
"srcArrow": "none",
"srcLabel": "",
"dst": "container.second",
"dstArrow": "triangle",
"dstLabel": "",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "#0D32B2",
"label": "1->2",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "#676C7E",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 29,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 103.10840707964601,
"y": 176
},
{
"x": 87.6216814159292,
"y": 216
},
{
"x": 87.55,
"y": 236
},
{
"x": 102.75,
"y": 276
}
],
"isCurve": true,
"animated": false,
"tooltip": "",
"icon": null
},
{
"id": "(container -> container.second)[0]",
"src": "container",
"srcArrow": "none",
"srcLabel": "",
"dst": "container.second",
"dstArrow": "triangle",
"dstLabel": "",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "#0D32B2",
"label": "c->2",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "#676C7E",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 28,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 151.891592920354,
"y": 176
},
{
"x": 167.3783185840708,
"y": 216
},
{
"x": 167.45,
"y": 236
},
{
"x": 152.25,
"y": 276
}
],
"isCurve": true,
"animated": false,
"tooltip": "",
"icon": null
}
]
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 468 KiB

View file

@ -0,0 +1,205 @@
{
"name": "",
"shapes": [
{
"id": "container",
"type": "",
"pos": {
"x": 12,
"y": 12
},
"width": 509,
"height": 321,
"level": 1,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "#E3E9FD",
"stroke": "#0D32B2",
"shadow": false,
"3d": false,
"multiple": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"fields": null,
"methods": null,
"columns": null,
"label": "container",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
"color": "#0A0F25",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 117,
"labelHeight": 41,
"labelPosition": "INSIDE_TOP_CENTER"
},
{
"id": "container.first",
"type": "",
"pos": {
"x": 87,
"y": 132
},
"width": 135,
"height": 126,
"level": 2,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "#EDF0FD",
"stroke": "#0D32B2",
"shadow": false,
"3d": false,
"multiple": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"fields": null,
"methods": null,
"columns": null,
"label": "first",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "#0A0F25",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 35,
"labelHeight": 26,
"labelPosition": "INSIDE_MIDDLE_CENTER"
},
{
"id": "container.second",
"type": "",
"pos": {
"x": 291,
"y": 111
},
"width": 155,
"height": 126,
"level": 2,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "#EDF0FD",
"stroke": "#0D32B2",
"shadow": false,
"3d": false,
"multiple": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"fields": null,
"methods": null,
"columns": null,
"label": "second",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "#0A0F25",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 55,
"labelHeight": 26,
"labelPosition": "INSIDE_MIDDLE_CENTER"
}
],
"connections": [
{
"id": "container.(first -> second)[0]",
"src": "container.first",
"srcArrow": "none",
"srcLabel": "",
"dst": "container.second",
"dstArrow": "triangle",
"dstLabel": "",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "#0D32B2",
"label": "1->2",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "#676C7E",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 29,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 222,
"y": 195
},
{
"x": 291,
"y": 195
}
],
"animated": false,
"tooltip": "",
"icon": null
},
{
"id": "(container -> container.second)[0]",
"src": "container",
"srcArrow": "none",
"srcLabel": "",
"dst": "container.second",
"dstArrow": "triangle",
"dstLabel": "",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "#0D32B2",
"label": "c->2",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "#676C7E",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 28,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"labelPercentage": 0,
"route": [
{
"x": 12,
"y": 111
},
{
"x": 281,
"y": 111
},
{
"x": 281,
"y": 153
},
{
"x": 291,
"y": 153
}
],
"animated": false,
"tooltip": "",
"icon": null
}
]
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 468 KiB

View file

@ -186,7 +186,7 @@ This script needs to run the following command as root:
$* $*
Please install doas, sudo, or su. Please install doas, sudo, or su.
EOF EOF
exit 1 return 1
fi fi
} }
@ -214,7 +214,7 @@ hide() {
return return
fi fi
cat "$out" >&2 cat "$out" >&2
exit "$code" return "$code"
} }
echo_dur() { echo_dur() {
@ -615,8 +615,14 @@ install() {
if [ -n "${TALA-}" ]; then if [ -n "${TALA-}" ]; then
log "tala-$TALA_VERSION-$OS-$ARCH has been successfully installed into $PREFIX" log "tala-$TALA_VERSION-$OS-$ARCH has been successfully installed into $PREFIX"
fi fi
log "Rerun this install script with --uninstall to uninstall"
if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then if ! echo "$PATH" | grep -qF "$PREFIX/bin"; then
logcat >&2 <<EOF logcat >&2 <<EOF
%%%%%%%%%%%%%%%%%%%%%%%%%
NEXT STEPS
%%%%%%%%%%%%%%%%%%%%%%%%%
Extend your \$PATH to use d2: Extend your \$PATH to use d2:
export PATH=$PREFIX/bin:\$PATH export PATH=$PREFIX/bin:\$PATH
Then run: Then run:
@ -641,8 +647,11 @@ EOF
log " Run man d2plugin-tala for detailed docs." log " Run man d2plugin-tala for detailed docs."
fi fi
fi fi
logcat >&2 <<EOF
log "Rerun the install script with --uninstall to uninstall" Something not working? Please let us know:
https://github.com/terrastruct/d2/issues/new
EOF
} }
install_d2() { install_d2() {
@ -743,7 +752,7 @@ uninstall_standalone_d2() {
if [ ! -e "$INSTALL_DIR/d2-$INSTALLED_VERSION" ]; then if [ ! -e "$INSTALL_DIR/d2-$INSTALLED_VERSION" ]; then
warn "missing standalone install release directory $INSTALL_DIR/d2-$INSTALLED_VERSION" warn "missing standalone install release directory $INSTALL_DIR/d2-$INSTALLED_VERSION"
warn "d2 have been installed via some other installation method." warn "d2 must have been installed via some other installation method."
return 1 return 1
fi fi
@ -766,7 +775,7 @@ uninstall_standalone_tala() {
if [ ! -e "$INSTALL_DIR/tala-$INSTALLED_VERSION" ]; then if [ ! -e "$INSTALL_DIR/tala-$INSTALLED_VERSION" ]; then
warn "missing standalone install release directory $INSTALL_DIR/tala-$INSTALLED_VERSION" warn "missing standalone install release directory $INSTALL_DIR/tala-$INSTALLED_VERSION"
warn "tala have been installed via some other installation method." warn "tala must have been installed via some other installation method."
return 1 return 1
fi fi