Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.94 KB

demonstrate-using-command-line.md

File metadata and controls

68 lines (48 loc) · 1.94 KB

Demonstrate using Command Line

Prerequisite software

The following software programs need to be installed:

  1. git
  2. senzingapi

Clone repository

  1. Set these environment variable values:

    export GIT_ACCOUNT=senzing
    export GIT_REPOSITORY=resolver
    export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
    export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
  2. Follow steps in clone-repository to install the Git repository.

Install

  1. Install prerequisites:
    1. Debian-based installation - For Ubuntu and others
    2. RPM-based installation - For Red Hat, CentOS, openSuse and others.

Run commands

  1. Make sure the following environment variables are set. Example:

    export LD_LIBRARY_PATH=/opt/senzing/g2/lib:/opt/senzing/g2/lib/debian:$LD_LIBRARY_PATH
    export PYTHONPATH=/opt/senzing/g2/python
  2. View file-input subcommand parameters. Example:

    cd ${GIT_REPOSITORY_DIR}
    ./resolver.py file-input --help
  3. Run command for file input/output. Example:

    cd ${GIT_REPOSITORY_DIR}
    ./resolver.py file-input \
      --input-file test/test-data-1.json \
      --output-file ${GIT_REPOSITORY_DIR}/resolver-output.json
  4. Run command for starting HTTP API. Example:

    cd ${GIT_REPOSITORY_DIR}
    ./resolver.py service
  5. Test HTTP API. Once service has started, try the HTTP requests.