aboutsummaryrefslogtreecommitdiff
path: root/create_notes.sh
blob: d5a77aeeacede83ae6d69c9fdcddc8bfa511a14b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

orgPath=$1

mkdir -p notes

# cat graphdata.json

# 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