/codeforces2pdf

Light tool to extract CodeForces problems into PDF files

Primary LanguageCSSMIT LicenseMIT

codeforces2pdf

Extract CodeForces problems to PDF files

A remake of https://github.com/AliOsm/codeforces2pdf, with Selenium replaced by requests + BeautifulSoup + either mathjax or make4ht latex renderer.

Prerequisites

Quickstart

Install dependencies with poetry

poetry install

or with raw pip

pip install -r requirements.txt

Extract a problem from a contest:

python3 codeforces2pdf.py [-d OUT_DIR] [-f|-g] <contest_id> <problem>

Notes

With -f | --fast the utility executes a tiny bit faster and requires only TexLive distribution, but produces simpler and much less sane views of latex formulas. With -g | --graphics the formulas are rendered to SVGs, one may prefer this rendering, but it consumes lots of CPU time.

License

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