Hello everyone! I've written a script in emacs lisp, that can:
- Submit solution
- Download tests
- Enter by handle/password
- Store cookies between runs
All the requests are made using curl
. link.
Installation
- Download script.
- Insert to your
~/.emacs
file the following code:
(add-to-list 'load-path "/folder/containing/script/")
(load "cf-keys.el")
Using
C-c i
— Log inC-c o
— Log outC-c w
— Get your current handleC-c s
— Submit currently open fileC-c d
— Save tests to current folder
Submit and save functions "guess" the contest number, problem index and the programming language by the current file name in one of the following forms:
directory/505/A/myfile.cpp
directory/505/a.c
directory/505a.cc
Setup
In your ~/.emacs
file you can change the default variable values:
cf-default-language
— Default language. Can be one of the values defined incf-languages.el
cf-host
— "codeforces.ru" or "codeforces.com"cf-cookies-file
— File, in whichcurl
will store cookies
Example: (setq cf-cookies-file "/home/vasya/my_codeforces_cookies")
Keybindings can be changed at the end of the file cf-keys.el
.