Skip to main content

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

  1. Initialize once per repository: trustnocorpo init.
  2. Build via CLI or your Makefile: trustnocorpo path/to.tex --classification=INTERNAL**.**
  3. 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:

  1. Add or update tests for new behavior.
  2. Keep CLI and Python API examples in this README in sync.
  3. 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trustnocorpo-1.0.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trustnocorpo-1.0.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file trustnocorpo-1.0.0.tar.gz.

File metadata

  • Download URL: trustnocorpo-1.0.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for trustnocorpo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 30c72085c5cc9244ad1073855231bff60dde8550e7bfa14a2d63cdd5f4e5c4fa
MD5 694ee694cf7b07fde0d55a254fe48adc
BLAKE2b-256 e3f635c0a966c1ee3e92db8f47e2764efb40d3d1d31aec4795ae2cb5f13e1ca3

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustnocorpo-1.0.0.tar.gz:

Publisher: pypi.yaml on Fran-cois/TrustNoCorpo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trustnocorpo-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: trustnocorpo-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for trustnocorpo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01554813c4e40cdbf08cc222ecefae7621ab462fbfcb3722ddef9ae428043db7
MD5 fc68af70c2c2e6407d63e2fbeb0edad4
BLAKE2b-256 9d598b49937c3e2a62bde94b81b6d4d1f405fbc5a63cf799420ea50ba6a605aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustnocorpo-1.0.0-py3-none-any.whl:

Publisher: pypi.yaml on Fran-cois/TrustNoCorpo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page