Skip to main content

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:

$ pip install inception-cli

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:

$ 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_PASSWORDaccording 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
      $ 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.)
      $ 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
      $ inception-cli project import -u INCEPTION_URL -U INCEPTION_REMOTE_API_USERNAME --regex '*.zip'
      

Metadata

Release files for inception-cli 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inception-cli 0.1.1
File Size Uploaded
inception_cli-0.1.1.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inception-cli 0.1.1
File Interpreter ABI Platform
inception_cli-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / inception_cli-0.1.1.tar.gz

Download URL inception_cli-0.1.1.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
52698c7d7eb7033917aa3f7827add26ece79107cbf40759a4141d6189ec8f763
BLAKE2b-256 checksum
How to use checksums
1b27a3fb93dc3346a40f81bc4c1b2d423aa9afb1103a5c17010175800c742c15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / inception_cli-0.1.1-py3-none-any.whl

Download URL inception_cli-0.1.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7628a5c0562d57b3e31d59fd89174928f4993bf58977d341bce7a5e0b7d639d0
BLAKE2b-256 checksum
How to use checksums
b3aab79ce2511beb0172e1d059206cd20f6185b3d11611e2df6d3685bb9aa619
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page