# inception-cli
*Command line tool for INCEpTION.*
## Purpose
This project provides a command line tool for the INCEpTION text
annotation platform which allows you to import, export and delete
projects.
## Installation
So far, the INCEpTION command line tool is not available from Pypi, but
you can still install it using pip directly from this GitHub repository
using the following command:
``` shell
$ pip install -U git+https://github.com/inception-project/inception-cli.git
```
## Prepare INCEpTION to be able to use the Remote API
- enable the remote API
- go to INCEpTIONs home folder
- open INCEpTIONs `settings.properties` file
- add the line `remote-api.enabled=true`
- restart INCEpTION
- now it should be possible to assign the role `ROLE_REMOTE` to a user
- create a remote-api user
- got to the user management page
- create a new user, e.g. `remote-api`
- assign at least the roles `ROLE_ADMIN`, `ROLE_USER` and `ROLE_REMOTE`
- make sure that the new user is enabled
- click on `Save`
## Usage
Run it from the command line to get a list of the available commands:
``` shell
$ inception-cli project
```
All commands require the following options:
- `-u`, `--url`.: INCEpTION instance URL
- `-U`, `--user`: User name of the previously created user, you
will be prompted to enter the password
If you do not want to enter this information multiple times, just set
the environment variables `INCEPTION_USERNAME` and
`INCEPTION_PASSWORD`according to the previously created user in the
console session where you invoke the CLI. You can also set the INCEpTION
instance url by the environment variable `INCEPTION_HOST`.
### delete
Deletes the given projects.
Options:
- `--regex` (default=`False`): Whether to interpret the project name
as a regular expression
- `--dry-run` (default=`False`): Whether log actions would be
performed without performing them
- `--projects`: Names / regular expression of the projects which
should be deleted
### export
Exports projects and saves them to disk.
Options:
- `--regex` (default=`False`): Whether to interpret the project name
as a regular expression
- `--dry-run` (default=`False`): Whether log actions would be
performed without performing them
- `-o`, `--out` (default=`.`): Where the exported projects
should be saved
- `--projects`: Names / regular expression of the projects which
should be exported
### import
Imports the given projects.
Options:
- `--projects`: Names of the zip-files which should be imported
### list
Lists the projects.
## Migrating projects from WebAnno to INCEpTION
- Enable the remote API in WebAnno
- go to WebAnno's home folder
- open WebAnno's `settings.properties` file
- add the line `remote-api.enabled=true`
- restart WebAnno
- now it should be possible to assign the role `ROLE_REMOTE` to a user
- Create a remote-api user in WebAnno
- got to the user management page
- create a new user, e.g. call it `remote-api`
- assign at least the roles `ROLE_ADMIN`, `ROLE_USER` and `ROLE_REMOTE`
- make sure that the new user is enabled
- click on **Save**
- Export all projects from WebAnno using inception-cli
- install inception-cli
``` shell
$ pip install -U git+https://github.com/inception-project/inception-cli.git
```
- export all projects from WebAnno (replace WEBANNO_URL and WEBANNO_REMOTE_API_USERNAME with the url of your WebAnno instance and the name of the user created in step 2.)
``` shell
$ inception-cli project export -u WEBANNO_URL -U WEBANNO_REMOTE_API_USERNAME --regex '.*'
```
- enter the password of the remote API user you created in WebAnno when asked
- `inception-cli` creates one zip-file for each exported project in the current directory
- Enable the remote API in INCEpTION
- go to INCEpTION's home folder
- open INCEpTION's `settings.properties` file
- add the line `remote-api.enabled=true`
- restart INCEpTION
- now it should be possible to assign the role `ROLE_REMOTE` to a user
- Create a remote-api user in INCEpTION
- got to the user management page
- create a new user, e.g. call it `remote-api`
- assign at least the roles `ROLE_ADMIN`, `ROLE_USER` and `ROLE_REMOTE`
- make sure that the new user is enabled
- click on **Save**
- Import all exported projects to INCEpTION using inception-cli (replace WEBANNO_URL and WEBANNO_REMOTE_API_USERNAME with the url of your WebAnno instance and the name of the user created in step 2)
- make sure the folder does not contain any zip-files which are no exported WebAnno-projects
``` shell
$ inception-cli project import -u INCEPTION_URL -U INCEPTION_REMOTE_API_USERNAME --regex '*.zip'
```
Raw data
{
"_id": null,
"home_page": "https://github.com/inception-project/inception-cli",
"name": "inception-cli",
"maintainer": "Richard Eckart de Castilho",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "INCEpTION",
"author": "The INCEpTION Project",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/7a/39/13096af5ae38c6cd545df3584b767783208fda6baaf79f361fc1edb26ea6/inception_cli-0.1.0.tar.gz",
"platform": null,
"description": "# inception-cli\n\n*Command line tool for INCEpTION.*\n\n## Purpose\n\nThis project provides a command line tool for the INCEpTION text\nannotation platform which allows you to import, export and delete\nprojects.\n\n## Installation\n\nSo far, the INCEpTION command line tool is not available from Pypi, but\nyou can still install it using pip directly from this GitHub repository\nusing the following command:\n\n``` shell\n$ pip install -U git+https://github.com/inception-project/inception-cli.git\n```\n\n## Prepare INCEpTION to be able to use the Remote API\n\n- enable the remote API\n - go to INCEpTIONs home folder\n - open INCEpTIONs `settings.properties` file\n - add the line `remote-api.enabled=true`\n - restart INCEpTION\n - now it should be possible to assign the role `ROLE_REMOTE` to a user\n- create a remote-api user\n - got to the user management page\n - create a new user, e.g. `remote-api`\n - assign at least the roles `ROLE_ADMIN`, `ROLE_USER` and `ROLE_REMOTE`\n - make sure that the new user is enabled\n - click on `Save`\n\n## Usage\n\nRun it from the command line to get a list of the available commands:\n\n``` shell\n$ inception-cli project\n```\n\nAll commands require the following options:\n\n- `-u`, `--url`.: INCEpTION instance URL\n- `-U`, `--user`: User name of the previously created user, you\n will be prompted to enter the password\n\nIf you do not want to enter this information multiple times, just set\nthe environment variables `INCEPTION_USERNAME` and\n`INCEPTION_PASSWORD`according to the previously created user in the\nconsole session where you invoke the CLI. You can also set the INCEpTION\ninstance url by the environment variable `INCEPTION_HOST`.\n\n### delete\n\nDeletes the given projects.\n\nOptions:\n\n- `--regex` (default=`False`): Whether to interpret the project name\n as a regular expression\n- `--dry-run` (default=`False`): Whether log actions would be\n performed without performing them\n- `--projects`: Names / regular expression of the projects which\n should be deleted\n\n### export\n\nExports projects and saves them to disk.\n\nOptions:\n\n- `--regex` (default=`False`): Whether to interpret the project name\n as a regular expression\n- `--dry-run` (default=`False`): Whether log actions would be\n performed without performing them\n- `-o`, `--out` (default=`.`): Where the exported projects\n should be saved\n- `--projects`: Names / regular expression of the projects which\n should be exported\n\n### import\n\nImports the given projects.\n\nOptions:\n\n- `--projects`: Names of the zip-files which should be imported\n\n### list\n\nLists the projects.\n\n\n## Migrating projects from WebAnno to INCEpTION\n\n- Enable the remote API in WebAnno\n - go to WebAnno's home folder\n - open WebAnno's `settings.properties` file\n - add the line `remote-api.enabled=true`\n - restart WebAnno\n - now it should be possible to assign the role `ROLE_REMOTE` to a user\n- Create a remote-api user in WebAnno\n - got to the user management page\n - create a new user, e.g. call it `remote-api`\n - assign at least the roles `ROLE_ADMIN`, `ROLE_USER` and `ROLE_REMOTE`\n - make sure that the new user is enabled\n - click on **Save**\n- Export all projects from WebAnno using inception-cli\n - install inception-cli\n ``` shell\n $ pip install -U git+https://github.com/inception-project/inception-cli.git\n ```\n - export all projects from WebAnno (replace WEBANNO_URL and WEBANNO_REMOTE_API_USERNAME with the url of your WebAnno instance and the name of the user created in step 2.)\n ``` shell\n $ inception-cli project export -u WEBANNO_URL -U WEBANNO_REMOTE_API_USERNAME --regex '.*'\n ```\n - enter the password of the remote API user you created in WebAnno when asked\n - `inception-cli` creates one zip-file for each exported project in the current directory\n- Enable the remote API in INCEpTION\n - go to INCEpTION's home folder\n - open INCEpTION's `settings.properties` file\n - add the line `remote-api.enabled=true`\n - restart INCEpTION\n - now it should be possible to assign the role `ROLE_REMOTE` to a user\n- Create a remote-api user in INCEpTION\n - got to the user management page\n - create a new user, e.g. call it `remote-api`\n - assign at least the roles `ROLE_ADMIN`, `ROLE_USER` and `ROLE_REMOTE`\n - make sure that the new user is enabled\n - click on **Save**\n- Import all exported projects to INCEpTION using inception-cli (replace WEBANNO_URL and WEBANNO_REMOTE_API_USERNAME with the url of your WebAnno instance and the name of the user created in step 2)\n - make sure the folder does not contain any zip-files which are no exported WebAnno-projects\n ``` shell\n $ inception-cli project import -u INCEPTION_URL -U INCEPTION_REMOTE_API_USERNAME --regex '*.zip'\n ```\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "INCEpTION command line tool",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/inception-project/inception-cli",
"Repository": "https://github.com/inception-project/inception-cli"
},
"split_keywords": [
"inception"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a612488526911a5c545fe7b519aeecfdfa7c0c6f4bb3e444a4c153c449b9b4bd",
"md5": "bb512bb03c07f99d124c38498d2c3804",
"sha256": "73f22e79787b7152203121196d16db5f19d88928ea3644dcae8d0d4808892f9e"
},
"downloads": -1,
"filename": "inception_cli-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bb512bb03c07f99d124c38498d2c3804",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 9586,
"upload_time": "2024-03-19T19:29:48",
"upload_time_iso_8601": "2024-03-19T19:29:48.783544Z",
"url": "https://files.pythonhosted.org/packages/a6/12/488526911a5c545fe7b519aeecfdfa7c0c6f4bb3e444a4c153c449b9b4bd/inception_cli-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7a3913096af5ae38c6cd545df3584b767783208fda6baaf79f361fc1edb26ea6",
"md5": "3a54b50c5b8c377c1b454e8f7b4e0a3d",
"sha256": "01a1bf8cde2ba5d9ecf75207f599cef0863ab8813870640aa4434ce3058d5b06"
},
"downloads": -1,
"filename": "inception_cli-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3a54b50c5b8c377c1b454e8f7b4e0a3d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 8057,
"upload_time": "2024-03-19T19:29:49",
"upload_time_iso_8601": "2024-03-19T19:29:49.995297Z",
"url": "https://files.pythonhosted.org/packages/7a/39/13096af5ae38c6cd545df3584b767783208fda6baaf79f361fc1edb26ea6/inception_cli-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-19 19:29:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "inception-project",
"github_project": "inception-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "inception-cli"
}