From 0246f6be98437e3aeea5dc345f26db9fdfd9c126 Mon Sep 17 00:00:00 2001 From: ikoamu Date: Sat, 27 Jan 2024 16:55:45 +0900 Subject: Refactor create_notes.sh script to copy files based on graphdata.json --- create_notes.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'create_notes.sh') diff --git a/create_notes.sh b/create_notes.sh index 652f620..d5a77ae 100755 --- a/create_notes.sh +++ b/create_notes.sh @@ -4,14 +4,19 @@ orgPath=$1 mkdir -p notes -cat graphdata.json +# cat graphdata.json -ls -ls "${orgPath}" +# ls -ls "${orgPath}" cat graphdata.json | jq -c '.data.nodes[]' | while read -r nodes; do id=$(echo "${nodes}" | jq -r '.id') file=$(echo "${nodes}" | jq -r '.file') + echo "=============================" + echo "id: ${id}" + echo "file: ${file}" + cat "${orgPath}/${file}" + cp -p "${orgPath}/${file}" "notes/${id}" done \ No newline at end of file -- cgit