0.01
The project is in a healthy, maintained state
AtCoder support tool - generate source template - generate test data from sample input/output - run tests - submit code
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 2.0
~> 13.0
~> 3.0
~> 0.10
~> 3.0

Runtime

~> 0.8.1
>= 2.4.3
~> 2.0
 Project Readme

Gem Version Gem Ruby CodeQL Maintainability Test Coverage GitHub

AtCoderFriends

Description

AtCoderFriends automates tasks about AtCoder programming contest such as:

  • Download example input/output
  • Generate source skeleton
  • Run test cases
  • Submit code

Dependencies

Installation

Add this line to your application's Gemfile:

gem 'at_coder_friends'

And then execute:

$ bundle

Or install it yourself as:

$ gem install at_coder_friends

Usage

Setup

at_coder_friends setup         /path/to/contest

Creates contest folder, and generates example data and source skeletons into the folder.

Open contest page

at_coder_friends open-contest  /path/to/contest/source_file

Opens the contet page which the contest folder linked to.

Run first test case

at_coder_friends test-one      /path/to/contest/source_file

Run all test cases

at_coder_friends test-all      /path/to/contest/source_file

Submit code

at_coder_friends submit        /path/to/contest/source_file

Submit code automatically if all tests passed

at_coder_friends check-and-go  /path/to/contest/source_file

Naming convention

  • Contest folder name will be used in the contest site URL. For example, if arc001 folder is specified, AtCoderFriends will use https://atcoder.jp/contests/arc001/.
  • Source file should be named [problem ID].[language specific extension](e.g. A.rb), in order to let AtCoderFriends find test cases or fill the submission form.
  • Suffixes (start with underscore) may be added to the file name (e.g. A_v2.rb), so that you can try multiple codes for one problem.

Notes

  • Compilation is not supported.
  • Source generator supports Ruby and C++ in default, and can be added by plugin.
  • Test runner and code submission are supported in 36 languages.

Configuration

See CONFIGURATION.md for details.

For Sublime Text user

It is convenient to use AtCoderFriends from Sublime Text plugin.

For Visual Studio Code user

  • Run Configure Tasks from the global Terminal menu.
  • Select the Create tasks.json file from template entry.
  • Select Others from the list.
  • Add following settings to tasks.json.
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "AtCoderFriends:New Contest",
      "type": "shell",
      "command": "at_coder_friends",
      "args": [
        "setup",
        "${input:contestName}"
      ],
      "problemMatcher": [],
      "group": "none"
    },
    {
      "label": "AtCoderFriends:Test One",
      "type": "shell",
      "command": "at_coder_friends",
      "args": [
        "test-one",
        "${file}"
      ],
      "problemMatcher": [],
      "group": "none"
    },
    {
      "label": "AtCoderFriends:Test All",
      "type": "shell",
      "command": "at_coder_friends",
      "args": [
        "test-all",
        "${file}"
      ],
      "problemMatcher": [],
      "group": "none"
    },
    {
      "label": "AtCoderFriends:Submit",
      "type": "shell",
      "command": "at_coder_friends",
      "args": [
        "submit",
        "${file}"
      ],
      "problemMatcher": [],
      "group": "none",
    },
    {
      "label": "AtCoderFriends:Check & Go",
      "type": "shell",
      "command": "at_coder_friends",
      "args": [
        "check-and-go",
        "${file}"
      ],
      "problemMatcher": [],
      "group": "none",
    },
    ...
  ],
  "inputs": [
    {
      "id": "contestName",
      "type": "promptString",
      "default": "",
      "description": "Contest Name"
    }
  ]
}

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/nejiko96/at_coder_friends. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the AtCoderFriends project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.