2023-10-23 00:09:14 +02:00
|
|
|
# orcli export template
|
|
|
|
|
|
|
|
```
|
|
|
|
orcli export template - export to any text format by providing your own GREL template
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
orcli export template PROJECT [FILE] [OPTIONS]
|
|
|
|
orcli export template --help | -h
|
|
|
|
|
|
|
|
Options:
|
|
|
|
--separator SEPARATOR
|
|
|
|
insert character(s) between rows/records
|
|
|
|
|
|
|
|
--prefix PREFIX
|
|
|
|
insert character(s) at the beginning of the file
|
|
|
|
|
|
|
|
--suffix SUFFIX
|
|
|
|
insert character(s) at the end of the file
|
|
|
|
|
|
|
|
--mode MODE
|
2023-11-01 01:19:21 +01:00
|
|
|
specify if project contains multi-row records
|
2023-10-23 00:09:14 +02:00
|
|
|
Allowed: rows, records
|
|
|
|
Default: rows
|
|
|
|
|
|
|
|
--facets FACETS
|
|
|
|
filter result set by providing an OpenRefine facets config in json
|
|
|
|
Default: []
|
|
|
|
|
|
|
|
--output FILE
|
|
|
|
Write to file instead of stdout
|
|
|
|
|
|
|
|
--encoding ENCODING
|
|
|
|
set character encoding
|
|
|
|
Default: UTF-8
|
|
|
|
|
|
|
|
--quiet, -q
|
|
|
|
suppress log output, print errors only
|
|
|
|
|
|
|
|
--help, -h
|
|
|
|
Show this help
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
PROJECT
|
|
|
|
project name or id
|
|
|
|
|
|
|
|
FILE
|
|
|
|
Path to row/record template file or URL. When FILE is -, read standard
|
|
|
|
input.
|
|
|
|
Default: -
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
orcli export template "duplicates" "template.txt"
|
|
|
|
cat "template.txt" | orcli export template "duplicates"
|
|
|
|
orcli export template "duplicates" "https://example.com/template.txt"
|
|
|
|
orcli export template "duplicates" "template.txt" --output "duplicates.tsv"
|
|
|
|
orcli export template "duplicates" \
|
|
|
|
<<< '{ "name" : {{jsonize(cells["name"].value)}}, "purchase" :
|
|
|
|
{{jsonize(cells["purchase"].value)}} }' \
|
|
|
|
--prefix '{ "events" : [' \
|
|
|
|
--separator , \
|
|
|
|
--mode records \
|
|
|
|
--suffix ]}$'\n' \
|
2023-10-28 16:23:11 +02:00
|
|
|
--facets '[ { "type": "text", "columnName": "name", "mode": "regex",
|
2023-10-28 16:31:10 +02:00
|
|
|
"caseSensitive": false, "invert": false, "query": "^Ben" } ]' \
|
2023-10-23 00:09:14 +02:00
|
|
|
| jq
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
code: [src/export_template_command.sh](../src/export_template_command.sh)
|