From b7b4a535d78861ff27756306acb57ca63d7138f8 Mon Sep 17 00:00:00 2001 From: ikoamu Date: Wed, 24 Jan 2024 21:59:12 +0900 Subject: Add script to create notes from graph data --- create_notes.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 create_notes.sh (limited to 'create_notes.sh') 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 -- cgit