Merge pull request #14 from bobmcwhirter/doc_fetching

Quick scripts to plunge through the JSONs.
This commit is contained in:
Dario Nieuwenhuis 2021-05-04 22:33:07 +02:00 committed by GitHub
commit cd5ea56f6f
2 changed files with 14 additions and 0 deletions

3
files_for.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
jq -r ".MCUs[] | select(.RPN == \"$1\") | .files[].file_id" sources/mcufinder/mcus.json

11
rm_for.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
#jq ".MCUs[] | select(.RPN == \"$1\") | .files[].file_id" sources/mcufinder/mcus.json
files=$(./files_for.sh $1)
#echo $files
for candidate in $files
do
jq -e ".Files[] | select(.id_file == \"$candidate\") | select(.type == \"Reference manual\")" ./sources/mcufinder/files.json
done