1af14125a5 | ||
---|---|---|
src | ||
.gitignore | ||
.gitpod.yml | ||
LICENSE | ||
README.md | ||
orcli |
README.md
orcli (💎+🤖)
Bash script to control OpenRefine via its HTTP API.
Features
- works with latest OpenRefine version (currently 3.5)
- provides nested sub-commands with help screens and usage examples
- supports batch processing (import, transform, export) with dedicated OpenRefine instances
- import CSV, TSV, line-based TXT, fixed-width TXT, JSON or XML (and specify input options)
- transform data either by directly calling operations or by providing a undo/redo JSON file
- export to CSV, TSV, HTML, XLS, XLSX, ODS
- templating export to additional formats like JSON or XML
Requirements
Install
-
Navigate to the OpenRefine program directory
-
Download bash script there and make it executable
wget https://github.com/opencultureconsulting/orcli/raw/main/orcli
chmod +x orcli
- Create a symlink in your $PATH (e.g. to ~/.local/bin)
ln -s "${PWD}/orcli" ~/.local/bin/
Usage
Ensure you have OpenRefine running (i.e. available at http://localhost:3333 or another URL) or use the integrated start command first.
Use integrated help screens for available options and examples for each command.
[felix@tux orcli]$ ./orcli --help
orcli - OpenRefine command-line interface written in Bash
Usage:
orcli [command]
orcli [command] --help | -h
orcli --version | -v
Commands:
info show project metadata
list list projects on OpenRefine server
Options:
--help, -h
Show this help
--version, -v
Show version number
Environment Variables:
OPENREFINE_URL
URL to OpenRefine server
Default: http://localhost:3333
OPENREFINE_CSRF
set to false for OpenRefine < 3.3
Default: true
Examples:
orcli list
orcli info clipboard
orcli info 1234567890123
Development
orcli uses bashly for generating the one-file script from files in the src
directory
- Install bashly (requires ruby)
gem install bashly
-
Edit code in src directory
-
Validate and generate script
bashly validate
bashly generate