diff options
| -rwxr-xr-x | bin/ia-metadata-for-dir2ia | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/bin/ia-metadata-for-dir2ia b/bin/ia-metadata-for-dir2ia index 35c4553..0a7fb0c 100755 --- a/bin/ia-metadata-for-dir2ia +++ b/bin/ia-metadata-for-dir2ia @@ -2,7 +2,22 @@ ia-metadata "$@" | jq -r ' .metadata | -del(.identifier, .publicdate, .addeddate, .curation, .uploader) | +.collection |= if . | type=="string" then [.] end | +.collection_added |= (.//[]) | +.collection_added |= if . | type=="string" then [.] end | +.collection -= .collection_added | +del( + .addeddate, + .audio_codec, + .audio_sample_rate, + .collection_added, + .curation, + .frames_per_second, + .identifier, + .publicdate, + .uploader, + .ZZZZZZZZZZZZZZZ_emptyentryattheend +) | to_entries[] | if (.value|type=="array") then { @@ -10,5 +25,5 @@ if (.value|type=="array") then value:.value[] } end | -"\u0027\(.key):\(.value)\u0027" +"\(.key):\(.value)" | @sh ' |
