logseq-publish-excalidraw-t.../to_svg.sh

4 lines
256 B
Bash
Raw Normal View History

2023-10-13 21:12:11 +00:00
#!/usr/bin/env bash
2023-10-15 15:46:00 +00:00
EXCALIDRAW=$(jq '{"type": .type, "version": .version, "source": .source, "elements": .elements, "appState": {"gridSize": null, "exportWithDarkMode": '"$2"'}}' "$1")
2023-10-13 21:12:11 +00:00
curl localhost:8080/excalidraw/svg --data-raw "$EXCALIDRAW" > "$1.svg"