diff options
| author | 2025-12-26 00:18:37 +0000 | |
|---|---|---|
| committer | 2025-12-26 00:18:37 +0000 | |
| commit | 229cfefaf7923992b849e6d2d2fc355a08315290 (patch) | |
| tree | 825787fd4f823336badc8fb3618a89b8ed3cbd4b | |
| parent | ia-metadata-for-dir2ia: remove some properties (diff) | |
| signature | ||
ia-metadata-for-dir2ia: parse things better, and add newlines
| -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 ' |
