Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rocktakey/emacs-online-judge
Interface for online-judge-tool on Emacs.
https://github.com/rocktakey/emacs-online-judge
emacs emacs-lisp online-judge
Last synced: 15 days ago
JSON representation
Interface for online-judge-tool on Emacs.
- Host: GitHub
- URL: https://github.com/rocktakey/emacs-online-judge
- Owner: ROCKTAKEY
- License: gpl-3.0
- Created: 2019-09-01T04:35:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-05T11:59:35.000Z (over 4 years ago)
- Last Synced: 2024-12-27T15:33:09.089Z (about 1 month ago)
- Topics: emacs, emacs-lisp, online-judge
- Language: Emacs Lisp
- Size: 104 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[[https://github.com/ROCKTAKEY/emacs-online-judge][https://img.shields.io/github/tag/ROCKTAKEY/emacs-online-judge.svg?style=flat-square]]
[[file:LICENSE][https://img.shields.io/github/license/ROCKTAKEY/emacs-online-judge.svg?style=flat-square]]
[[https://github.com/ROCKTAKEY/emacs-online-judge/actions][https://img.shields.io/github/workflow/status/ROCKTAKEY/emacs-online-judge/CI/master.svg?style=flat-square]]
* client of online-judge-tools for Emacs.
Causion: This project is only support atcoder now.
I will adapt it to others, such as Topcoder, Codeforce and so on
in the future. Pull-Request, Issue, providing information, or any other
contribution is welcome!* How to Use?
You have to install online-judge-tools(~oj~) [[https://github.com/kmyk/online-judge-tools][here]].
In addition, this package depends on [[https://github.com/rejeep/f.el][f.el]] and [[https://github.com/magnars/dash.el][dash.el]]
Then, you have to add ~oj~ to your path, or set path to ~oj~ to ~online-judge-executable~.Then, in buffer where ~online-judge-mode~ is on, you can use some command below:
- ~online-judge-login~
- ~online-judge-download-test~
- ~online-judge-run-test~
- ~online-judge-submit~
- ~online-judge-test&submit~
- ~online-judge-toggle-error-range~
- ~online-judge-update-error-range~Let's try on AtCoder, for example.
1. Run ~online-judge-login~ to login host for submit.
Select atcoder, and put username and password.
2. Make directory ~/somewhere/atcoder/abc140/~ and make file ~a.cpp~
3. Open ~a.cpp~ with ~find-file~.
4. Run ~online-judge-mode~. The string ~atcoder/abc140/a~ is displayed on mode-line.
Host, contest and problem id is automatically recognized from directory.
5. Solve and compile it (~g++ a.cpp~).
6. Run ~online-judge-run-test~. Result of test is displayed.
7. Run ~online-judge-submit~ to submit the file. Confirmation is needed by default.
8. If URL detection or other oj job failed, you can directly #+setupfile: URL
by ~online-judge-set-url~.
** The Other Useful things
- ~online-judge-test&submit~ can automatically submit the file when tests are all collect.
- ~online-judge-mode~ become automatically on when list of strings ~online-judge-directories~ has ancestor of the file.* Functions
** ~online-judge-login~
Login selected host. Use ID and password is needed.
You have to login before submission or real-time participation of contest.
** ~online-judge-set-url~
You can directly set URL by this function.
** ~online-judge-download-test~
Download testcases. Other function which need testcases run it automatically,
so you don't have to run this function on yourself.
** ~online-judge-run-test~
Test program with tesecases. You can set command to run
~online-judge-command-name~.
See [[#command-name][online-judge-command-name]].
** ~online-judge-submit~
Submit source code.
** ~online-judge-test&submit~
Submit source code if test is passed.
** ~online-judge-toggle-error-range~
Toggle error range ~online-judge--error-range~, between 0 and
~online-judge-error-range-default~, which default is 1e-6.
See [[#error-range-default][online-judge-error-range-default]].
** ~online-judge-update-error-range~
Update ~online-judge--error-range~. This value is not saved when kill emacs,
so you should setq to ~online-judge-error-range-default~ if you want save.
* Variables
** ~online-judge-command-name~
:PROPERTIES:
:CUSTOM_ID: command-name
:END:
Run command name for test, or sexp which return such a name.
** ~online-judge-error-range-default~
:PROPERTIES:
:CUSTOM_ID: error-range-default
:END:
Permitted default error when toggle error range with
~online-judge-toggle-error-range~.
* License
This package is licensed by GPLv3. See [[file:LICENSE][LICENSE]].