add raw toggle

This commit is contained in:
slonkazoid 2024-12-26 19:37:17 +03:00
parent 7abb70b879
commit 5736765e63
Signed by: slonk
SSH key fingerprint: SHA256:tbZfJX4IOvZ0LGWOWu5Ijo8jfMPi78TU7x1VoEeCIjM

5
blag
View file

@ -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"
}