By alfadel, history, 4 years ago,

Hello Codeforces, yesterday I published a new light tool to extract CodeForces problems in PDF format, you can find the tool and the story behind it in this GitHub repository.

• +30

 » 4 years ago, # |   +5 You can also convert these pages: http://codeforces.com/contest/992/problems
•  » » 4 years ago, # ^ |   0 It looks like pretty easy, I will work to add this feature to the tool.
•  » » 4 years ago, # ^ |   0 Now you can extract entire contests using the contest ID from CodeForces URL, please check and try it if you can.
 » 4 years ago, # |   +3 there's an issue with pictures in problems, here: pdf and problem
•  » » 4 years ago, # ^ |   0 Thank you for reporting this, I will work to fix the issue as soon as possible.
•  » » 4 years ago, # ^ |   0 Now you can extract problems with images, please check and try it if you can.
 » 4 years ago, # |   +12 Could you add requirements.txt for easier installation? What's the purpose of the minified CSS file in repository? If it's yours, you'd better put it not minified; if it's just Codeforces CSS, you'd better fetch this from CF. I think using selenium for just downloading the page and extracting subtree of the DOM is a bit overkill.
•  » » 4 years ago, # ^ |   +8 I've created requirements.txt can you check it? The css.css file contains the styles for problem statement block in the page from CodeForces, the file is static for all problems in the sit, so I've decided to put it with the code and not to fetch it every time someone trying to download new problem. I know, and Selenium make it very slow, but if you provide me a method to render MathJax characters from HTML into PDF and get this n, I will remove Selenium and use regular HTTP get request.
•  » » » 4 years ago, # ^ |   +1 It's fine now, thanks It could change on Codeforces, so I'd still prefer to fetch it from CF but that's just faultfinding. Oh, I forgot that CF problem pages are not static. That's okay in this case, sorry for faultfinding again.
•  » » » 4 years ago, # ^ |   0 Can't you convert the TeX representation of MathJax characters to PDF?
•  » » » » 4 years ago, # ^ |   0 No, are you have any resource to do it?
•  » » » » » 4 years ago, # ^ |   0 You could try htlatex tool which is part of core distribution.
•  » » » » » » 4 years ago, # ^ |   0 Can you mention any GitHub repository or tutorial?
 » 3 years ago, # |   0 How can I extract multiple problems in one pdf file without/with pagebreak?