From 5736765e63120fc1323f5ebb48719f872a9e1294 Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Thu, 26 Dec 2024 19:37:17 +0300 Subject: [PATCH] add raw toggle --- blag | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blag b/blag index 684fd02..915463c 100755 --- a/blag +++ b/blag @@ -34,12 +34,13 @@ metadata() { local tags=$(for tag in "${TAGS[@]}"; do printf '%s' "$tag" | jq -Rs .; done | jq -sr @json) local dont_cache=false [[ "${DONT_CACHE:+x}" == 'x' ]] && dont_cache=true + local raw=$(_json_str_opt "$RAW") - printf '{"title":%s,"description":%s,"author":%s,"icon":%s,"icon_alt":%s,"color":%s,"created_at":%s,"modified_at":%s,"tags":%s,"dont_cache":%s}\n' \ + printf '{"title":%s,"description":%s,"author":%s,"icon":%s,"icon_alt":%s,"color":%s,"created_at":%s,"modified_at":%s,"tags":%s,"dont_cache":%s,"raw":%s}\n' \ "$title" "$description" "$author" \ "$icon" "$icon_alt" "$color" \ "$created_at" "$modified_at" \ - "$tags" "$dont_cache" + "$tags" "$dont_cache" "$raw" }