Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
/ gscli Public archive

Command-line interface for GlobalSight web services

License

Notifications You must be signed in to change notification settings

tingley/gscli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gscli: A command-line tool for the GlobalSight TMS

This is a work in progress. I wrote it to simplify certain types of testing and to provide a framework for automating certain other types of tasks.

Basics

  • Download the latest release.
  • To run: run java -jar gscli-1.0-alpha1.jar (or whatever jar is included in the release).

Building the code

gscli builds with maven.

Getting Help

To get a list of commands, run gscli with no arguments.

To get (limited) help for a command, run

    gscli help [COMMAND]

Profiles

gscli can save credentials for one or more GlobalSight instances/accounts. Each instance/account pair is known as a "profile". To add a profile, use

    gscli add-profile -url=[URL] -username=[USERNAME] -password=[PASSWORD]

The [URL] parameter should include the full path to the application, but not the location of the web services endpoint (for example, http://localhost/globalsight).

Profiles are associated with a "profile name", which defaults to the profile's username. You can override this by specifying -name=[NAME] to add-profile. The first profile configured will become the default for future invocations. To use a non-default profile, you can pass the -profile=[PROFILENAME] argument to any command. To change the default profile, use the set-default-profile command.

Profile information is stored in a file called .globalsight in the user's home directory.

WARNING: profile credentials are stored in PLAINTEXT. If this is a problem you can specify -url, -username, and -password explicitly to any command.

Creating a Job

The create-job command was the original motivation for writing this tool. create-job will attempt to do as much as possible on its own:

  • Job names are based on the first file uploaded
  • File profiles are selected automatically when possible based on file extension
  • All target locales are selected by default

For example, the following should work (assuming the existence of a valid profile and a configured file profile for .html files in GlobalSight):

    gscli create-job test.html

However, if you want to get fancy, there are a number of other options:

  • -fileprofile or -fileprofileid to specify the file profile to use (by name and ID, respectively)
  • -name to manually specify the job name
  • -repeat [N] to repeatedly create the job [N] times in quick succession

License

Like GlobalSight itself, all code is released under the Apache 2.0 license.

About

Command-line interface for GlobalSight web services

Resources

License

Stars

Watchers

Forks

Languages