Skip to main content

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

kattispdf-1.0.1.tar.gz (178.3 kB view hashes)

Uploaded Source

Built Distribution

kattispdf-1.0.1-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page