Codeforces2pdf
Light tool to extract CodeForces problems into PDF files
Install / Use
/learn @AliOsm/Codeforces2pdfREADME
codeforces2pdf
Light tool to extract CodeForces problems into PDF files
Motivation (Why I've written this?)
I was training in someday and I was tired from sitting in front of the laptop, so I decided to download CodeForces problems in PDF, then print them and solve the problems on my bed!
Unfortunately, there was not any good way to download CodeForces problems in PDF, I was looking for a PDF file that contains one problem with its statement only, without CodeForces` logo, tags or anything else.
So I've written this code in Python. However, this is my first Python code and I've extracted all CodeForces problems in PDFs, you can find them here (there are crazy facts about CodeForces in that repository).
Ok, to be honest, training was not the only thing motivated me to do this, I was looking for some small project to try Selenium on it, so this was the key of motivation.
Have fun with your training.
Prerequisites
- Python 3.x
- Selenium
- ChromeDriver
- WeasyPrint
- The code in this repository tested on Ubuntu 18.04 LTS
Usage
After downloading the files in this repository (codeforces2pdf.py - css.css), from terminal you can run them as follows:
-
Extract the entire contest problems in one PDF file:
~ python3 codeforces2pdf.py <contest_id> -
Extract one problem from a contest:
~ python3 codeforces2pdf.py <contest_id> <problem_character>
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/AliOsm/codeforces2pdf.
License
The project is available as open source under the terms of the MIT License.
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
