TrustNoCorpo
Cryptographic PDF tracking for LaTeX builds — with optional PDF password protection and an encrypted audit log per project.
Track who built what, when, and how — directly from your LaTeX toolchain or Python.
Features
- 🔒 Encrypted audit log stored locally under .trustnocorpo/
- 🔐 Optional PDF password protection (via pypdf)
- 🧰 Drop-in CLI for initializing projects and building PDFs
- 🐍 Python API for programmatic builds
- 🧪 Testing without LaTeX (LaTeX calls are mocked in tests)
Quick start
Install (editable)
python3 -m pip install -e .
Run tests
pytest -q
Initialize a project
trustnocorpo init
This creates a .trustnocorpo/ workspace in your repo and copies helpful templates (e.g., a Makefile).
Build a document (CLI)
trustnocorpo build path/to/document.tex --classification=CONFIDENTIAL
# or shorthand:
trustnocorpo path/to/document.tex --classification=CONFIDENTIAL
The --classification flag lets you tag builds (e.g., INTERNAL, CONFIDENTIAL, SECRET) in the encrypted audit trail.
Python API
from tnc.core import trustnocorpo
cms = trustnocorpo()
cms.init_project() # creates .trustnocorpo/ if missing
pdf_path = cms.build("document.tex", classification="SECRET")
print("PDF:", pdf_path)
Makefile template
A portable Makefile is provided at example/Makefile. Typical usage:
# Adjust as needed
DOC ?= document.tex
CLASS ?= CONFIDENTIAL
.PHONY: pdf
pdf:
# Build with tracking + classification label
trustnocorpo $(DOC) --classification=$(CLASS)
.PHONY: init
init:
trustnocorpo init
Use make init once per repo; make pdf thereafter.
Requirements & notes
- LaTeX toolchain (e.g., pdflatex/xelatex) is only required when you actually compile PDFs.
- Tests do not require LaTeX; they mock the LaTeX layer.
- PDF protection: implemented with PyPDF2.
- Audit storage: encrypted SQLite database lives under .trustnocorpo/ within your project directory.
CLI availability
The trustnocorpo command is installed via the package’s console script entry point.
After pip install -e ., ensure your environment is active and your shell can see the script on PATH. If not:
- Activate your virtualenv (source venv/bin/activate) or
- Rehash your shims (e.g., hash -r in bash/zsh) or
- Run via python -m tnc.cli as a fallback.
For all options:
trustnocorpo --help
How it fits in your LaTeX workflow
- Initialize once per repository: trustnocorpo init.
- Build via CLI or your Makefile: trustnocorpo path/to.tex --classification=INTERNAL**.**
- Ship the PDF; the build metadata (who/when/what) is logged encrypted in .trustnocorpo/.
You keep full control: all tracking is local to your project unless you choose to export logs.
Troubleshooting
- trustnocorpo: command not found Activate your virtual environment or re-open your shell; confirm pip show lists the package.
- LaTeX not found Ensure pdflatex/xelatex is on PATH. Only needed for real builds, not for tests.
- PDF not protected as expected Verify you passed the appropriate protection options (see --help) and that the output path isn’t being overwritten by another tool.
Contributing
PRs welcome! Please:
- Add or update tests for new behavior.
- Keep CLI and Python API examples in this README in sync.
- Run pytest -q before submitting.
License
See LICENSE in the repository.
Appendix: Design goals
- Minimal friction for LaTeX users (works with existing Makefiles).
- Local-first & private: encrypted logs live in your repo.
- Explicit classification to reduce accidental leaks.
- Scriptable via CLI and Python for CI/CD integration.
Metadata
Release files for trustnocorpo 1.0.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 | |
|---|---|---|---|
| trustnocorpo-1.0.0.tar.gz | 19.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trustnocorpo-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.6 kB
Release files / trustnocorpo-1.0.0.tar.gz
| Download URL | trustnocorpo-1.0.0.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30c72085c5cc9244ad1073855231bff60dde8550e7bfa14a2d63cdd5f4e5c4fa
|
|
BLAKE2b-256 checksum How to use checksums |
e3f635c0a966c1ee3e92db8f47e2764efb40d3d1d31aec4795ae2cb5f13e1ca3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2025.
Transparency logRelease files / trustnocorpo-1.0.0-py3-none-any.whl
| Download URL | trustnocorpo-1.0.0-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01554813c4e40cdbf08cc222ecefae7621ab462fbfcb3722ddef9ae428043db7
|
|
BLAKE2b-256 checksum How to use checksums |
9d598b49937c3e2a62bde94b81b6d4d1f405fbc5a63cf799420ea50ba6a605aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2025.
Transparency log