logseq-publish-excalidraw-t.../to_svg.sh
2023-10-13 23:12:11 +02:00

4 lines
252 B
Bash
Executable File

#!/usr/bin/env bash
EXCALIDRAW=$(jq '{"type": .type, "version": .version, "source": .source, "elements": .elements, "appState": {"gridSize": null, "exportWithDarkMode": $2}}' "$1")
curl localhost:8080/excalidraw/svg --data-raw "$EXCALIDRAW" > "$1.svg"