gotzillaz / cf_crawler

Codeforces submission crawler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cf_crawler

This is cf_crawler for crawling the accepted submissions from Codeforces. The main purposes of this repository are to make an archive of my own Codeforeces submissions and to learn how to write Rust language. Note that the coding style may not follow the best practice as I am still in the early learning stage.

Usage

To build the code:

cargo build

To run the code:

cargo run

Environment file

There are four required parameters in the .env file. Please first check .env.template, then modify and rename it to .env.

  • SUBMISSION_JSON_PATH: a path to a JSON array that describes the list of target submissions. This can be obtained by using Codeforces API (link).
  • LANG_EXT_PATH: a path to a JSON object that maps the programmingLanguage to file extension. Please check the example below.
{
    "GNU C++20 (64)": ".cpp",
    "PyPy 3-64": ".py",
    "Java 7": ".java",
}
  • HTML_PATH: a path for storing the downloaded submission html files.
  • OUTPUT_PATH: a path for storing the source codes, parsed from html files.

About

Codeforces submission crawler


Languages

Language:Rust 100.0%