atgo

command module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 1 Imported by: 0

README

atgo

atgo is a tool for Gophers that allows them to perform AtCoder operations using commands.

Conformance to rules for generated AI

AtCoder生成AI対策ルール - 20240607版
(mearning of AtCoder AI Policy)

AtCoder has established the rules described in the above document to restrict the use of generated AI in the ABC.
atgo has been modified to conform to these rules in v0.0.4, so please use v0.0.4 or later to participate in ABC.

Installation

atgo is installed with the following command.

curl -sSfL https://raw.githubusercontent.com/meian/atgo/main/install | bash

To use specify the build version, use the following command.

curl -sSfL https://raw.githubusercontent.com/meian/atgo/main/install | bash -s -- --tag v0.0.1

If a pre-built binary is available at release, download the binary.
For OS/architectures that do not have pre-built binaries, the installer will build them internally using go install, which requires Go 1.22 or higher.

Operating Environment

  • Linux
    • Development is working on Debian in Docker

Mac and Windows have not been tested, but they are expected to work if installation is possible.

Usage

Setting Up Your Workspace

The current directory will be used as the workspace.
All commands should be run from this directory.

Authentication

Register your credential with the following command using your AtCoder username and password:

$ atgo auth
Username: kitamin
Password: *******

Once you save your credential with atgo auth, you will be automatically logged in when executing other commands.

The credential is stored locally with simple encryption.
If you want to remove the local credential, run the following command:

$ atgo auth clear
Loading Tasks

To output the contest information and the task list of associated with it, run the following command:

$ atgo contest [Contest ID]

To output task details, run the following command:

$ atgo task [task ID]

If you want to prepare the files locally to the task, run the following command:

$ atgo task local-init [task ID]

The above command will create the following new files.

  • main.go
  • main_test.go
  • go.mod
  • go.sum

Once files are created, they are cached, and the next time you run atgo task local-init for the same task, the cached file will be loaded locally instead of being created anew.

Implementing the answer and Testing

Please implement the code to solve the task in main.go.
And you can verify the sample input and output result using go test.

Submission

To submit your code, run the following command:
The target for submission is the task that was last initialized with atgo task local-init.

$ atgo submit
Additional Commands

To output the list of past contests:

# load past archived contests information(by category)
$ atgo contest load [abc or arc or agc or ahc]

# output list of past archived contests
$ atgo contest list [abc or arc or agc or ahc]

To clean up managed database:

$ atgo workspace clean

DB deleted by the above command contains the following information.
Caches prepared locally with atgo task local-init are not removed.

  • contest information
  • task information
  • contest and task associations

License

This project is licensed under the MIT License.

Documentation

Overview

Copyright © 2024 kitamin <meian.colorful@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL