stygtfo
A simple tool to comment out packages not used in a latex document.
Why? Because I usually experiment with packages a lot and in the end I don't use them all, but it's basically impossible to know which ones I don't use.
This pacakge compiles the document with every package commented out one by one, and compares the expected pdf output with the actual pdf output. If the pdf output is the same, the package is determined not used and commented out.
This package is not tested basically at all, and I only used tectonic to test it (beacuse the others are slow and don't garantee the packages are installed). It might not work with other engines. In fact, it probably won't. Maybe in the future I'll update it, but I doubt it. Fell free to fork it and make PRs.
Usage
stygtfo <pathToTexFile> [--output <outputfile>] [--engine <pathToEngine>] [--verbose <bool>] [--args <argsToPassToEngine>] [--temp <pathToTempDir>]
Currently, the --args option is not implemented, if some interest is shown I'm free to do it.
import stygtfo
stygtfo.CheckUnusedPackages("path/to/file.tex", "path/to/engin", usedPackages=None, resultedPath=None, verbose=False, pathToTemp=None)
Installation
pip install --user stygtfo
You will need the same requirements as diff-pdf-visually, which on Windows is ImageMagick and Poppler. You can get them on chocolatey too.
I don't know if the --user flag is actually needed, but I had some problems with it, so I recommend using it (except if you're installing it in a virtualenv).
Metadata
Release files for stygtfo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stygtfo-0.1.0.tar.gz | 3.7 kB | Without provenance | Details for stygtfo-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stygtfo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for stygtfo-0.1.0-py3-none-any.whl |
Total release size: 7.6 kB
Release files / stygtfo-0.1.0.tar.gz
| Download URL | stygtfo-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adabc187508126abcf567e8cd0c754f507defbe0bb4157abbbb92f3a986b7e5a
|
|
BLAKE2b-256 checksum How to use checksums |
8b4b8e30cc0458bc8dbdb09b26cf03a09f13eda239a60489b7ab37b502831d7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.11.0 Windows/10
|
Release files / stygtfo-0.1.0-py3-none-any.whl
| Download URL | stygtfo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bacae09e14fd36333ff5dfb6c8b8282f20826bca65caf5d51b2651d8af8f1802
|
|
BLAKE2b-256 checksum How to use checksums |
c549b88ba3ab9b086f61f4138a454d7783666cbe5e755eb93b35862513f5c95e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.11.0 Windows/10
|
Security for stygtfo 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.