aboutsummaryrefslogtreecommitdiff
path: root/create_notes.sh
diff options
context:
space:
mode:
authorikoamu <ikoamu@gmail.com>2024-01-24 21:59:12 +0900
committerikoamu <ikoamu@gmail.com>2024-01-24 21:59:12 +0900
commitb7b4a535d78861ff27756306acb57ca63d7138f8 (patch)
treebeb7da6fb74539940a36c57c86e3b05bc12458dc /create_notes.sh
parent5994ddcbdb74c0536fc63fa344316198b21b7122 (diff)
Add script to create notes from graph data
Diffstat (limited to 'create_notes.sh')
-rwxr-xr-xcreate_notes.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/create_notes.sh b/create_notes.sh
new file mode 100755
index 0000000..05c727a
--- /dev/null
+++ b/create_notes.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+mkdir -p notes
+
+cat graphdata.json |
+jq -c '.data.nodes[]' |
+while read -r nodes; do
+ id=$(echo "${nodes}" | jq -r '.id')
+ file=$(echo "${nodes}" | jq -r '.file')
+ cp -p "${file}" "notes/${id}"
+done \ No newline at end of file