trustnocorpo


Nametrustnocorpo JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryCryptographic PDF tracking for LaTeX with optional PDF protection and encrypted audit logs.
upload_time2025-08-17 22:30:07
maintainerNone
docs_urlNone
authorTrustNoCorpo Security Team
requires_python>=3.9
licenseMIT
keywords latex pdf security cryptography watermark cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

# **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.

---

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "trustnocorpo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "latex, pdf, security, cryptography, watermark, cli",
    "author": "TrustNoCorpo Security Team",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e3/f6/35c0a966c1ee3e92db8f47e2764efb40d3d1d31aec4795ae2cb5f13e1ca3/trustnocorpo-1.0.0.tar.gz",
    "platform": null,
    "description": "\n\n# **TrustNoCorpo**\n\n**Cryptographic PDF tracking for LaTeX builds** \u2014 with optional PDF password protection and an **encrypted audit log** per project.\n\n> Track who built what, when, and how \u2014 directly from your LaTeX toolchain or Python.\n\n---\n\n## **Features**\n\n* \ud83d\udd12 **Encrypted audit log** stored locally under **.trustnocorpo/**\n* \ud83d\udd10 **Optional PDF password protection** (via pypdf)\n* \ud83e\uddf0 **Drop-in CLI** for initializing projects and building PDFs\n* \ud83d\udc0d **Python API** for programmatic builds\n* \ud83e\uddea **Testing without LaTeX** (LaTeX calls are mocked in tests)\n\n---\n\n## **Quick start**\n\n### **Install (editable)**\n\n```\npython3 -m pip install -e .\n```\n\n### **Run tests**\n\n```\npytest -q\n```\n\n### **Initialize a project**\n\n```\ntrustnocorpo init\n```\n\nThis creates a **.trustnocorpo/** workspace in your repo and copies helpful templates (e.g., a Makefile).\n\n### **Build a document (CLI)**\n\n```\ntrustnocorpo build path/to/document.tex --classification=CONFIDENTIAL\n# or shorthand:\ntrustnocorpo path/to/document.tex --classification=CONFIDENTIAL\n```\n\n> The **--classification** flag lets you tag builds (e.g., **INTERNAL**, **CONFIDENTIAL**, **SECRET**) in the encrypted audit trail.\n\n---\n\n## **Python API**\n\n```\nfrom tnc.core import trustnocorpo\n\ncms = trustnocorpo()\ncms.init_project()  # creates .trustnocorpo/ if missing\npdf_path = cms.build(\"document.tex\", classification=\"SECRET\")\nprint(\"PDF:\", pdf_path)\n```\n\n---\n\n## **Makefile template**\n\nA portable Makefile is provided at **example/Makefile**. Typical usage:\n\n```\n# Adjust as needed\nDOC          ?= document.tex\nCLASS        ?= CONFIDENTIAL\n\n.PHONY: pdf\npdf:\n\t# Build with tracking + classification label\n\ttrustnocorpo $(DOC) --classification=$(CLASS)\n\n.PHONY: init\ninit:\n\ttrustnocorpo init\n```\n\n> Use **make init** once per repo; **make pdf** thereafter.\n\n---\n\n## **Requirements & notes**\n\n* **LaTeX toolchain** (e.g., **pdflatex**/**xelatex**) is only required when you actually compile PDFs.\n  * **Tests** do **not** require LaTeX; they mock the LaTeX layer.\n* **PDF protection**: implemented with **PyPDF2**.\n* **Audit storage**: encrypted SQLite database lives under **.trustnocorpo/** within your project directory.\n\n---\n\n## **CLI availability**\n\nThe **trustnocorpo** command is installed via the package\u2019s **console script** entry point.\n\nAfter **pip install -e .**, ensure your environment is active and your shell can see the script on **PATH**. If not:\n\n* Activate your virtualenv (**source venv/bin/activate**) or\n* Rehash your shims (e.g., **hash -r** in bash/zsh) or\n* Run via **python -m tnc.cli** as a fallback.\n\nFor all options:\n\n```\ntrustnocorpo --help\n```\n\n---\n\n## **How it fits in your LaTeX workflow**\n\n1. **Initialize once** per repository: **trustnocorpo init**.\n2. **Build** via CLI or your Makefile: trustnocorpo path/to.tex --classification=INTERNAL**.**\n3. **Ship the PDF**; the build metadata (who/when/what) is logged **encrypted** in **.trustnocorpo/**.\n\n> You keep full control: all tracking is local to your project unless you choose to export logs.\n\n---\n\n## **Troubleshooting**\n\n* **trustnocorpo: command not found**\n  Activate your virtual environment or re-open your shell; confirm **pip show** lists the package.\n* **LaTeX not found**\n  Ensure **pdflatex**/**xelatex** is on **PATH**. Only needed for real builds, not for tests.\n* **PDF not protected as expected**\n  Verify you passed the appropriate protection options (see **--help**) and that the output path isn\u2019t being overwritten by another tool.\n\n---\n\n## **Contributing**\n\nPRs welcome! Please:\n\n1. Add or update tests for new behavior.\n2. Keep CLI and Python API examples in this README in sync.\n3. Run **pytest -q** before submitting.\n\n---\n\n## **License**\n\nSee **LICENSE** in the repository.\n\n---\n\n## **Appendix: Design goals**\n\n* **Minimal friction** for LaTeX users (works with existing Makefiles).\n* **Local-first & private**: encrypted logs live in your repo.\n* **Explicit classification** to reduce accidental leaks.\n* **Scriptable** via CLI and Python for CI/CD integration.\n\n---\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Cryptographic PDF tracking for LaTeX with optional PDF protection and encrypted audit logs.",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://example.com/trustnocorpo"
    },
    "split_keywords": [
        "latex",
        " pdf",
        " security",
        " cryptography",
        " watermark",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9d598b49937c3e2a62bde94b81b6d4d1f405fbc5a63cf799420ea50ba6a605aa",
                "md5": "fc68af70c2c2e6407d63e2fbeb0edad4",
                "sha256": "01554813c4e40cdbf08cc222ecefae7621ab462fbfcb3722ddef9ae428043db7"
            },
            "downloads": -1,
            "filename": "trustnocorpo-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fc68af70c2c2e6407d63e2fbeb0edad4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 19123,
            "upload_time": "2025-08-17T22:30:05",
            "upload_time_iso_8601": "2025-08-17T22:30:05.650254Z",
            "url": "https://files.pythonhosted.org/packages/9d/59/8b49937c3e2a62bde94b81b6d4d1f405fbc5a63cf799420ea50ba6a605aa/trustnocorpo-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e3f635c0a966c1ee3e92db8f47e2764efb40d3d1d31aec4795ae2cb5f13e1ca3",
                "md5": "694ee694cf7b07fde0d55a254fe48adc",
                "sha256": "30c72085c5cc9244ad1073855231bff60dde8550e7bfa14a2d63cdd5f4e5c4fa"
            },
            "downloads": -1,
            "filename": "trustnocorpo-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "694ee694cf7b07fde0d55a254fe48adc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 19521,
            "upload_time": "2025-08-17T22:30:07",
            "upload_time_iso_8601": "2025-08-17T22:30:07.053386Z",
            "url": "https://files.pythonhosted.org/packages/e3/f6/35c0a966c1ee3e92db8f47e2764efb40d3d1d31aec4795ae2cb5f13e1ca3/trustnocorpo-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-17 22:30:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "trustnocorpo"
}
        
Elapsed time: 0.88944s