Skip to content

Instantly share code, notes, and snippets.

@BrandonLMorris
Created March 2, 2016 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrandonLMorris/793d683c68b3cc5e3367 to your computer and use it in GitHub Desktop.
Save BrandonLMorris/793d683c68b3cc5e3367 to your computer and use it in GitHub Desktop.

General

auacm-cli is a command line tool that can be used to interact with the auacm.com api through the terminal. The general command is auacm will subcommands for interacting with particular facets of the site.

Subcommands

  • [none] for general information
  • login/logout
  • problem
  • submit
  • comp[etition[s]]
  • blog

Story list

User management

  • whoami I can run a command that will tell me if I am logged in, and if so who I am logged in as

  • login I can run a command that will log me in as a user. My password will not display as I type it in

Problem management

  • problem [-v/--verbose [-i/--id]] [-a/--all] I can run a command that will return information about a problem given it's PID or (part of) it's name

    • If part of the name is given, the command will extrapolate which problem I am referring to. If it cannot, I will be informed.
    • If multiple matches for part of a problem name are found, the program will prompt me to narrow the results (limiting how much are displayed, with most relevant first).
  • problem info I can run a command that will return detailed information about a problem: the description, input/output, sample cases, etc. Follows same provisions as above

  • problem init I can run a command that will initialize a directory for a problem. The directory will have a title similar to the problem.

    • problem init -v/--verbose Optionally, I can have the command also create a readme file with the full problem description and directory containing the sample cases.
  • problem test file.sol I can run a command that will test my solution against the sample cases, be they downloaded in the current directory or pulled from the API.

Submission Management

  • problem submit file.sol [id/name] I can run a command that will submit my solution to the API, and I will receive the results of the submission (initially through API requests, though eventually via a socket connection)

Competition Management

  • comp[etition[s]] [-a/--all] I can run a command that will list recent and ongoing competitions

    • By default, only competitions in the past 2 months will be listed, though older competitions can be allowed by additional arguments
  • comp[etition[s]] info [cid]I can run a command that will list general info about a competition (participants, problems, time, etc.)

  • scoreboard [cid] I can run a command that will display the scoreboard of a competition at that given moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment