Skip to content

Commit

Permalink
support no-timestamp file
Browse files Browse the repository at this point in the history
  • Loading branch information
ikoamu committed Apr 3, 2024
1 parent 0351190 commit ae44476
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions create_notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jq -c '.data.nodes[]' |
while read -r nodes; do
id=$(echo "${nodes}" | jq -r '.id')
file=$(echo "${nodes}" | jq -r '.file')
timestamp=$(echo "${file}" | cut -d'-' -f1)
matching_file=$(find "${org_path}" -name "${timestamp}-*.org" -type f)
matching_file=$(find "${org_path}" -name "${file}" -type f)

if [[ -f "${matching_file}" ]]; then
cp -p "${matching_file}" "notes/${id}"
Expand Down

0 comments on commit ae44476

Please sign in to comment.