It enables you to download pdf with problems from https://open.kattis.com
Project description
KattisPDF
KattisPDF is a Python library and tool that allows to convert problem statements from Kattis to pdf.
Installation
To install KattisPDF just use pip
:
pip install kattispdf
It is necessary to install a LaTeX processor such as TeX Live or MiKTeX. As PyLaTeX is used and it needs pdflatex
or latexmk
(Recommended) to create the pdf.
Linux
latexmk
is available in almost every package manager. Search it on your favourite package manager.
Windows
In order to uselatexmk
in Windows you need to install perl
.
# If you have pearl install you can omit this
winget install "Strawberry Perl"
winget install MiKTeX
Once you are done reboot your device.
How to use
KattisPDF includes a CLI tool kpdf
to download the problems automaticly, but it can also be used in a python script.
CLI Tool
kpdf problem-id -o path/to/output
Python Script
import kattispdf
problem_id = "alchemy101"
kattispdf.generate_pdf(problem_id)
To see an example of the outputed pdf look at example.pdf.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kattispdf-1.0.7.tar.gz
.
File metadata
- Download URL: kattispdf-1.0.7.tar.gz
- Upload date:
- Size: 178.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a98b54f2ce2008c53f94f3d578ae942bc4b369b289950c7c826bfd8baea50905 |
|
MD5 | 754ca70f677825b7c2970bd8ce1b9813 |
|
BLAKE2b-256 | 6e99054a47417e6077ee5a2f0d178426bfb442f28a25779075776c2c6b420a50 |
File details
Details for the file kattispdf-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: kattispdf-1.0.7-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 305c344af7226f77af550d8d9acd47a4506885ec955798ae3e2da9cc356bb70f |
|
MD5 | ae699402d70d45588087d45aef34353a |
|
BLAKE2b-256 | f671b67c10f7ff8e73ad9f58d9291589a30312e9506fa98802403941ec9daa0d |