#!/bin/sh ia-metadata "$@" | jq -r ' .metadata | .collection |= if . | type=="string" then [.] end | .collection_added |= (.//[]) | .collection_added |= if . | type=="string" then [.] end | .collection -= .collection_added | del( ."access-restricted", ."access-restricted-item", ."addeddate", ."admin-collection", ."audio_codec", ."audio_sample_rate", ."boxid", ."collection_added", ."curation", ."foldoutcount", ."force-update", ."frames_per_second", ."geo_restricted", ."identifier", ."imagecount", ."marc-insert-only", ."neverindex", ."next_item", ."noindex", ."no_ol_import", ."ocr", ."operator", ."previous_item", ."publicdate", ."public-format", ."republisher", ."republisher_date", ."republisher_operator", ."republisher_time", ."repub_state", ."scanfee", ."scanningcenter", ."show_related_music_by_track", ."source_pixel_height", ."source_pixel_width", ."sponsordate", ."start_localtime", ."start_time", ."stop_time", ."title_message", ."tuner", ."updated", ."updateddate", ."updater", ."uploader", ."utc_offset", ."video_codec", ."viruscheck", ."ZZZZZZZZZZZZZZZ_emptyentryattheend" ) | to_entries[] | if (.value|type=="array") then { key:.key, value:.value[] } end | "\(.key):\(.value)" | @sh '