Блог пользователя alfadel

Автор alfadel, история, 6 лет назад, По-английски

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.

Have fun and if there are any comments about it, please let me know :)

  • Проголосовать: нравится
  • +30
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

You can also convert these pages: http://codeforces.com/contest/992/problems

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    It looks like pretty easy, I will work to add this feature to the tool.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Now you can extract entire contests using the contest ID from CodeForces URL, please check and try it if you can.

»
6 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

there's an issue with pictures in problems, here: pdf and problem

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Thank you for reporting this, I will work to fix the issue as soon as possible.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Now you can extract problems with images, please check and try it if you can.

»
6 лет назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится
  1. Could you add requirements.txt for easier installation?
  2. 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.
  3. I think using selenium for just downloading the page and extracting subtree of the DOM is a bit overkill.
  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +8 Проголосовать: не нравится
    1. I've created requirements.txt can you check it?
    2. 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.
    3. 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.
    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится
      1. It's fine now, thanks
      2. It could change on Codeforces, so I'd still prefer to fetch it from CF but that's just faultfinding.
      3. Oh, I forgot that CF problem pages are not static. That's okay in this case, sorry for faultfinding again.
    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Can't you convert the TeX representation of MathJax characters to PDF?