Giter Club home page Giter Club logo

cfparser's Introduction

cfparser

Emacs plugin for participating in http://codeforces.com programming competitions.

Installation

  • Install curl
  • Download cfparser
  • Add to your ~/.emacs file the following:
(add-to-list 'load-path "/path/to/cfparser/")
(require 'cf-mode)
  • Put cf-mode minor mode to hook you wish. For example:
(add-hook 'find-file-hook 'cf-mode)  ; enable cf-mode for all open files

Optional setup

In ~/.emacs file you can change variables:

  • cf-cookies-file - file, in which curl will store cookies
  • cf-default-language - language to be used when it was not recognized by extension
  • cf-test-command - shell command to compile and run your solution on sample tests. For example:
(setq cf-test-command
  (concat
    "g++ sol.cc; "
    "for i in `ls *.in | sed 's/.in//'`; do "
    "echo test $i; "
    "./a.out < $i.in | diff - $i.ans; "
    "done;"))

In file cf-languages.el you can adjust extension-to-language mappings.

Usage

  • C-c c w - Who am I
  • C-c c s - Submit currently open file
  • C-c c i - Log In
  • C-c c o - Log Out
  • C-c c d - Download sample tests to current folder (0.in, 0.ans, 1.in ...)
  • C-c c t - Execute cf-test-command
  • C-c c l - List most recent submissions

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

See also

  • gabrielsimoes/cfparser.vim -- Similar plugin for Vim. It has more features than this one (e.g it can display a problem statement).

cfparser's People

Contributors

gabrielsimoes avatar gnull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cfparser's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.