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.
Metadata
Release files for kattispdf 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kattispdf-1.0.7.tar.gz | 178.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kattispdf-1.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 187.1 kB
Release files / kattispdf-1.0.7.tar.gz
| Download URL | kattispdf-1.0.7.tar.gz |
|---|---|
| Size | 178.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a98b54f2ce2008c53f94f3d578ae942bc4b369b289950c7c826bfd8baea50905
|
|
BLAKE2b-256 checksum How to use checksums |
6e99054a47417e6077ee5a2f0d178426bfb442f28a25779075776c2c6b420a50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4
|
Release files / kattispdf-1.0.7-py3-none-any.whl
| Download URL | kattispdf-1.0.7-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
305c344af7226f77af550d8d9acd47a4506885ec955798ae3e2da9cc356bb70f
|
|
BLAKE2b-256 checksum How to use checksums |
f671b67c10f7ff8e73ad9f58d9291589a30312e9506fa98802403941ec9daa0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.4
|