list basic command line options in readme files
This commit is contained in:
parent
67b586a734
commit
bd73be52ea
12
README.rst
12
README.rst
|
@ -5,11 +5,21 @@ OpenRefine Python Client Library
|
||||||
The OpenRefine Python Client Library provides an interface to
|
The OpenRefine Python Client Library provides an interface to
|
||||||
communicating with an `OpenRefine <http://openrefine.org/>`_ server.
|
communicating with an `OpenRefine <http://openrefine.org/>`_ server.
|
||||||
|
|
||||||
If you are looking for a command line interface to OpenRefine then you might be interested in the docker variation of this library:
|
If you are looking for a ready to use command line interface to OpenRefine then you might be interested in the docker variation of this library:
|
||||||
`felixlohmeier/openrefine-client <https://hub.docker.com/r/felixlohmeier/openrefine-client/>`_. You will find examples for batch processing (e.g. for usage in shell scripts) there.
|
`felixlohmeier/openrefine-client <https://hub.docker.com/r/felixlohmeier/openrefine-client/>`_. You will find examples for batch processing (e.g. for usage in shell scripts) there.
|
||||||
|
|
||||||
If you are familiar with python and want to go into more depth, then read on!
|
If you are familiar with python and want to go into more depth, then read on!
|
||||||
|
|
||||||
|
Features
|
||||||
|
=============
|
||||||
|
|
||||||
|
Command line interface:
|
||||||
|
|
||||||
|
- list projects: refine.py --list
|
||||||
|
- create project from file: refine.py --create [FILE] [PROJECTID]
|
||||||
|
- apply rules from json file: refine.py --apply [FILE.json] [PROJECTID]
|
||||||
|
- export project to file: refine.py --export [PROJECTID] --output=FILE.tsv
|
||||||
|
|
||||||
Currently, the following API is supported:
|
Currently, the following API is supported:
|
||||||
|
|
||||||
- project creation/import, deletion, export
|
- project creation/import, deletion, export
|
||||||
|
|
|
@ -5,13 +5,18 @@ There are some client libraries for OpenRefine that communicate with the [OpenRe
|
||||||
### basic usage
|
### basic usage
|
||||||
|
|
||||||
1) start server:
|
1) start server:
|
||||||
> docker run -d --name=openrefine-server felixlohmeier/openrefine
|
```docker run -d --name=openrefine-server felixlohmeier/openrefine```
|
||||||
|
|
||||||
2) start client (prints help screen):
|
2) run client with one of the following commands:
|
||||||
> docker run --rm --link openrefine-server felixlohmeier/openrefine-client
|
|
||||||
|
- list projects: ```docker run --rm --link openrefine-server felixlohmeier/openrefine-client --list```
|
||||||
|
- create project from file: ```docker run --rm --link openrefine-server felixlohmeier/openrefine-client --create [FILE] [PROJECTID]```
|
||||||
|
- apply rules from json file: ```docker run --rm --link openrefine-server felixlohmeier/openrefine-client --apply [FILE.json] [PROJECTID]```
|
||||||
|
- export project to file: ```docker run --rm --link openrefine-server felixlohmeier/openrefine-client --export [PROJECTID] --output=FILE.tsv```
|
||||||
|
- check help screen for more options: ```docker run --rm --link openrefine-server felixlohmeier/openrefine-client --help```
|
||||||
|
|
||||||
3) cleanup:
|
3) cleanup:
|
||||||
> docker stop openrefine-server && docker rm openrefine-server
|
```docker stop openrefine-server && docker rm openrefine-server```
|
||||||
|
|
||||||
### example for customized run commands in interactive mode (e.g. for usage in terminals)
|
### example for customized run commands in interactive mode (e.g. for usage in terminals)
|
||||||
|
|
||||||
|
@ -50,7 +55,7 @@ There are some client libraries for OpenRefine that communicate with the [OpenRe
|
||||||
|
|
||||||
3) create project (import file)
|
3) create project (import file)
|
||||||
|
|
||||||
```docker run --rm --link openrefine-server -v ${workingdir}:/data:z felixlohmeier/openrefine-client -c $inputfile```
|
```docker run --rm --link openrefine-server -v ${workingdir}:/data:z felixlohmeier/openrefine-client --create $inputfile```
|
||||||
|
|
||||||
4) get project id
|
4) get project id
|
||||||
|
|
||||||
|
@ -58,11 +63,11 @@ There are some client libraries for OpenRefine that communicate with the [OpenRe
|
||||||
|
|
||||||
5) apply transformations from json file
|
5) apply transformations from json file
|
||||||
|
|
||||||
```docker run --rm --link openrefine-server -v ${workingdir}:/data felixlohmeier/openrefine-client -f ${jsonfile} ${project}```
|
```docker run --rm --link openrefine-server -v ${workingdir}:/data felixlohmeier/openrefine-client --apply ${jsonfile} ${project}```
|
||||||
|
|
||||||
6) export project to file
|
6) export project to file
|
||||||
|
|
||||||
```docker run --rm --link openrefine-server -v ${workingdir}:/data felixlohmeier/openrefine-client -E --output=${project}.tsv ${project}```
|
```docker run --rm --link openrefine-server -v ${workingdir}:/data felixlohmeier/openrefine-client --export --output=${project}.tsv ${project}```
|
||||||
|
|
||||||
7) cleanup
|
7) cleanup
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue