- 1 Overview
- 2 Server Setup
- 3 Required Settings
- 4 Optional Settings
- 5 Client Install Preparation
- 6 Client Install Distribution
Lingobot CLI is an extension of Lingobot that allows similar commands to be processed without the use of a collaboration utility like Slack or Flowdock. The commands can be run directly from a command line, or can be launched with user-friendly prompts from an IDE like Eclipse. In either case, they allow developers direct access to some of the many powerful Lingoport i18n features.
Once Lingobot has been set up, there are only a few additional settings needed to make Lingobot CLI available on the server side. These can be found within the lingobot_config.sh file in the Lingobot installation. The settings are listed below:
# API TOKENS FOR ADAPTERS export HUBOT_FLOWDOCK_API_TOKEN= export HUBOT_SLACK_TOKEN=xoxb-261328978756-CLBkOlekDXMoFiQSXVWcTNP6 export CISCOSPARK_ACCESS_TOKEN= export CISCOSPARK_SECRET= export LINGOBOT_API_TOKEN=ZDIwY2IyMWU4M2RlNDhhZjIxZjY0Y2NhODdh # OPTIONAL CONFIGS FOR LINGOBOT API export LINGOBOT_API_STATUS_INTERVAL_SECONDS_ARRAY=0,10,20,30 # example: 15,30,60,150,300 (note: the last interval will continue to be used until the timeout is reached export LINGOBOT_API_STATUS_TIMEOUT_MINUTES=0 # identifies how long a JVM request will wait for a response. example: 60 LINGOBOT_API_STATUS_MINUTES_TO_KEEP_MAXIMUM = # identifies the maximum number of minutes a response message will be retained on the server
If your system has been installed with the Stack Installer, this value will already be populated. Leave it alone and move to the next variable. This value must be set to a unique value, preferably a 36-character GUID such as can be created here https://www.guidgenerator.com/. The value set here will also be used in the Client Install Preparation below.
When a Lingobot command has been processed, but the server is unable to respond immediately, this comma-delimited grouping of numbers identifies how many seconds until the client next checks the status. If the variable is not set, the default is "15,30,60,60,60,180,300", meaning the client will check for the command completion after 15 seconds, then 30 seconds, then 60 seconds, etc. The final number in the list will continue to be used indefinitely until a timeout is reached.
If the first digit is 0, it will check the timeout value immediately. If you don't wish the system to check the status, set the first value to zero.
This value defaults to 15, and identifies how long JVM clients will continue to check with the server for completion before a timeout is reached. Since a single JVM may use 50mb or more of memory, keeping this value low helps manage memory on client machines, particularly when multiple commands may be issued in a short period of time.
This value identifies the maximum number of minutes the server will remember the result of any particular command. The value default to 500; however, the retrieval and distribution to the client of a command result also eliminates the tracking of that command. Thus, it is rare that any particular command will be tracked this long.
Client Install Preparation
The Lingobot installation includes a zip file containing the files needed to run Lingobot CLI from a client machine, and integrate the calls into the Eclipse IDE. However, the following values should be updated in the app.properties file of the zip file before it is distributed to developers:
This value should be updated with the URL of the Lingobot server to be called.
This value should be updated for the Port at which Lingobot server is to be called. Normally this will be 5001, unless it has been changed from that default value in lingobot_config.sh (Port property).
This value should be set to the same value as LINGOBOT_API_TOKEN in the Server Setup section above. The values must be synchronized to the same value or the client commands reaching the server will be rejected.
In addition to the app.properties settings mentioned above, it may be helpful to update the ReadMe file with any custom information that may be helpful to developers.
Client Install Distribution
It's recommended that Lingoport customers re-zip the client install and make it available to their own developers as desired. This is often done through the System Administrator, and may involved distributing the necessary file through the company's own website or software distribution portal.