orcli/src/export_tsv_command.sh

19 lines
494 B
Bash
Raw Normal View History

2022-04-14 12:06:54 +02:00
# shellcheck shell=bash
projectid="$(get_id "${args[project]}")"
separator='\t'
# assemble specific post data (some options require json format)
data+=("project=${projectid}")
data+=("format=tsv")
options='{ '
options+="\"separator\": \"${separator}\""
if [[ ${args[--encoding]} ]]; then
options+=', '
options+="\"encoding\": \"${args[--encoding]}\""
fi
options+=' }'
data+=("options=${options}")
2022-11-16 16:37:34 +01:00
# call post_export function to post data and validate results
post_export "${data[@]}"