Metadata-Version: 2.5
Name: onekit-tools
Version: 0.3.0
Summary: One simple toolkit. An offline CLI and shared browser processing core.
Project-URL: Homepage, https://onekit.org
Project-URL: Repository, https://github.com/mattiapiazzalunga/onekit
Project-URL: Issues, https://github.com/mattiapiazzalunga/onekit/issues
Project-URL: Requests, https://onekit.org/requests/
Project-URL: Author, https://www.mattiapiazzalunga.com
Author-email: Mattia Piazzalunga <hello@mattiapiazzalunga.com>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: cli,conversion,diff,pdf,privacy,utilities
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Provides-Extra: all
Requires-Dist: brotli<2,>=1.2; (sys_platform != 'win32' or platform_machine != 'ARM64') and extra == 'all'
Requires-Dist: defusedxml<0.8,>=0.7.1; extra == 'all'
Requires-Dist: fonttools<5,>=4.67; extra == 'all'
Requires-Dist: json5<1,>=0.14; extra == 'all'
Requires-Dist: jsonschema<5,>=4.26; extra == 'all'
Requires-Dist: markdown-it-py<5,>=4.2; extra == 'all'
Requires-Dist: markdownify<2,>=1.2.3; extra == 'all'
Requires-Dist: openpyxl<4,>=3.1.5; extra == 'all'
Requires-Dist: pillow<13,>=12.3; extra == 'all'
Requires-Dist: pycryptodome<4,>=3.24.1; extra == 'all'
Requires-Dist: pypdf<7,>=6.20.1; extra == 'all'
Requires-Dist: pypdfium2<6,>=5.14; extra == 'all'
Requires-Dist: pytesseract<0.4,>=0.3.13; extra == 'all'
Requires-Dist: python-barcode==0.16.1; extra == 'all'
Requires-Dist: python-docx<2,>=1.2; extra == 'all'
Requires-Dist: python-pptx<2,>=1.0.2; extra == 'all'
Requires-Dist: pyyaml<7,>=6.0.3; extra == 'all'
Requires-Dist: reportlab<5,>=4.4; extra == 'all'
Requires-Dist: ruff<0.18,>=0.17; extra == 'all'
Requires-Dist: segno<2,>=1.6.6; extra == 'all'
Requires-Dist: stream-inflate==0.0.12; extra == 'all'
Requires-Dist: stream-unzip==0.0.91; extra == 'all'
Requires-Dist: stream-zip==0.0.84; extra == 'all'
Requires-Dist: tomli-w<2,>=1.2; extra == 'all'
Requires-Dist: xmlschema<5,>=4.2; extra == 'all'
Requires-Dist: zxing-cpp<4,>=3.1.1; extra == 'all'
Provides-Extra: barcode
Requires-Dist: pillow<13,>=12.3; extra == 'barcode'
Requires-Dist: python-barcode==0.16.1; extra == 'barcode'
Requires-Dist: zxing-cpp<4,>=3.1.1; extra == 'barcode'
Provides-Extra: devtools
Requires-Dist: defusedxml<0.8,>=0.7.1; extra == 'devtools'
Requires-Dist: json5<1,>=0.14; extra == 'devtools'
Requires-Dist: jsonschema<5,>=4.26; extra == 'devtools'
Requires-Dist: pyyaml<7,>=6.0.3; extra == 'devtools'
Requires-Dist: ruff<0.18,>=0.17; extra == 'devtools'
Requires-Dist: tomli-w<2,>=1.2; extra == 'devtools'
Requires-Dist: xmlschema<5,>=4.2; extra == 'devtools'
Provides-Extra: documents
Requires-Dist: markdown-it-py<5,>=4.2; extra == 'documents'
Requires-Dist: markdownify<2,>=1.2.3; extra == 'documents'
Requires-Dist: openpyxl<4,>=3.1.5; extra == 'documents'
Requires-Dist: python-docx<2,>=1.2; extra == 'documents'
Requires-Dist: python-pptx<2,>=1.0.2; extra == 'documents'
Provides-Extra: fonts
Requires-Dist: brotli<2,>=1.2; (sys_platform != 'win32' or platform_machine != 'ARM64') and extra == 'fonts'
Requires-Dist: fonttools<5,>=4.67; extra == 'fonts'
Provides-Extra: images
Requires-Dist: pillow<13,>=12.3; extra == 'images'
Provides-Extra: ocr
Requires-Dist: pytesseract<0.4,>=0.3.13; extra == 'ocr'
Provides-Extra: pdf
Requires-Dist: pillow<13,>=12.3; extra == 'pdf'
Requires-Dist: pypdf<7,>=6.20.1; extra == 'pdf'
Requires-Dist: pypdfium2<6,>=5.14; extra == 'pdf'
Requires-Dist: reportlab<5,>=4.4; extra == 'pdf'
Provides-Extra: qrcode
Requires-Dist: pillow<13,>=12.3; extra == 'qrcode'
Requires-Dist: python-barcode==0.16.1; extra == 'qrcode'
Requires-Dist: segno<2,>=1.6.6; extra == 'qrcode'
Requires-Dist: zxing-cpp<4,>=3.1.1; extra == 'qrcode'
Provides-Extra: security
Requires-Dist: pycryptodome<4,>=3.24.1; extra == 'security'
Requires-Dist: stream-inflate==0.0.12; extra == 'security'
Requires-Dist: stream-unzip==0.0.91; extra == 'security'
Requires-Dist: stream-zip==0.0.84; extra == 'security'
Provides-Extra: signing
Requires-Dist: pyhanko<1,>=0.34; extra == 'signing'
Provides-Extra: test
Requires-Dist: build<2,>=1.6; extra == 'test'
Requires-Dist: hatchling==1.32.4; extra == 'test'
Requires-Dist: pip-audit<3,>=2.10; extra == 'test'
Requires-Dist: pip-licenses<6,>=5.5; extra == 'test'
Requires-Dist: pytest<10,>=9.1; extra == 'test'
Requires-Dist: ruff<0.18,>=0.17; extra == 'test'
Provides-Extra: video
Requires-Dist: yt-dlp[default]<2027,>=2026.8.19; extra == 'video'
Description-Content-Type: text/markdown

<!-- Copyright 2026 Mattia Piazzalunga -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
<p align="center"><img src="images/logo.svg" alt="OneKit" width="120"></p>
<h1 align="center">OneKit</h1>
<p align="center">One simple toolkit. Your files stay yours.</p>
<p align="center"><a href="https://github.com/mattiapiazzalunga/onekit/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/mattiapiazzalunga/onekit"></a> <a href="https://pypi.org/project/onekit-tools/"><img alt="PyPI" src="https://img.shields.io/pypi/v/onekit-tools"></a> <img alt="Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue"> <img alt="Python 3.11+" src="https://img.shields.io/badge/python-3.11%2B-blue"></p>

An offline Python toolkit for conversions, PDFs, images, archives, fonts, file inspection, encryption, developer utilities, OCR and comparisons. Use this CLI or the graphical interface at **[onekit.org](https://onekit.org)**. Both use the same processing core and catalog.

**Source version:** `0.2.9`. Stable downloads exist only after the release workflow completes. The distribution is `onekit-tools`; the separately owned PyPI project called `onekit` is unrelated.

The CLI catalog contains all **205 tools**, including every one of the webapp's **158 available tools** plus 47 additional tools. The hosted URL shortener is separate from this toolkit. `onekit list` and `onekit doctor` include availability from both Python and webapp JavaScript/WebAssembly adapters. Native CLI engines still require their documented installation. See the [CLI/web parity audit](docs/web-parity.md) for executed cases and remaining local setup requirements.

Video downloading is an optional network operation: install `onekit-tools[video]` and FFmpeg, then run `onekit download "VIDEO_URL" -o downloads/`. It supports YouTube and other yt-dlp sites, with a 128 MiB output limit. Browser downloads support direct video links that permit CORS, up to 32 MiB. See the [CLI reference](docs/cli.md) for setup and limitations.

QR codes: generate text, URL, Wi-Fi and fully configurable vCard codes, scan images, reverse stored content and convert JSON ↔ QR locally. Install `onekit-tools[qrcode]`; see the [QR code guide](docs/qrcode.md). The browser Scan tool also supports the camera.

## Install

Python 3.11+ is required. The universal wheel supports Windows, macOS and Linux on x64/ARM64. Optional native libraries and external engines have additional platform requirements.

After publication:

```sh
python -m pip install onekit-tools
python -m pip install "onekit-tools[pdf,images,documents]"
onekit list
onekit doctor
```

From a source checkout:

```sh
python -m pip install -e ".[all,test]"
python -m onekit --help
python -m pytest -q
```

The base CLI has **no runtime dependencies**. Install only the extras you need. `all` includes the standard Python families; cryptographic signing uses the separate `signing` extra. Install native engines separately. For Node-based developer tools, install Node.js 24+ and run `onekit engines install`. Processing never silently downloads compiler/converter programs.

## Use

```sh
onekit run pdf-merge first.pdf second.pdf -o combined.pdf
onekit run pdf-extract-pages document.pdf --options '{"pages":"1,3-5"}' -o selected.pdf
onekit run image-convert image.png --options '{"format":"webp"}' -o image.webp
onekit run diff-notebook before.ipynb after.ipynb --options '{"mode":"code"}' -o changes.json
onekit run security-encrypt private-folder --ask-password -o private.zip
onekit run security-decrypt private.zip --ask-password -o restored
```

Options are JSON objects; pass them as one quoted shell argument. Use `--ask-password` for secrets. Existing outputs are preserved unless you pass `--force`.

`onekit list --group pdf`, `onekit list --json` and `onekit doctor TOOL_ID` expose contracts and requirements. Every tool has a directory under [tools](tools), containing metadata and a pointer to its shared implementation. See the [CLI guide](docs/cli.md) for options and limits.

## Toolkit

| Family | Capabilities |
| --- | --- |
| Converters | Markdown, HTML, LaTeX, PDF, Word, PowerPoint, images, Base64, Excel, CSV and JSON |
| PDF | Merge/split, page selection/order/removal, compression, repair, [direct text editing](docs/pdf-editing.md), text overlays, rotation, digital signatures, encryption/unlock, external PDF/A conversion/validation |
| Images | Extract embedded PDF images, compress, crop and change format |
| Media | Audio/video conversion through separately installed FFmpeg |
| Archives / fonts | ZIP/TAR variants; TTF/OTF containers and WOFF/WOFF2 |
| Inspector / security | Type signatures, structure, metadata, encoding, hashes, text counts; authenticated encrypted file/folder archives |
| Developer | Language-specific formatting, parser/compiler validation and selected minification |
| OCR | Scanned images/PDF to searchable PDF, Word, Markdown, LaTeX, HTML and JSON |
| Diff | Text, code, normalized JSON, notebooks, LaTeX, PDF and Word text |

Content-preserving operations and conversions with compromises are distinguished explicitly. PDF-to-Word reconstructs extracted text, not original layout. OCR is not guaranteed exact. Fonts retain their outline technology. The browser exposes only tools verified in its worker; native-only features remain in development there.

## Pipelines and development

`onekit pipeline --steps workflow.1kit INPUTS -o OUTPUT` accepts a versioned `.1kit` workflow document exported by the web app. Each step receives prior outputs. Single-input steps map over multiple outputs; merge steps receive the collection. Incompatible types stop processing.

Read [architecture](docs/architecture.md), [engine setup and licenses](docs/engines.md), [release operations](docs/releases.md), [contribution requirements](CONTRIBUTING.md) and [security](SECURITY.md). New features and fixes require regression tests. GitHub Actions checks platform compatibility, browser contracts, native integrations, security, licenses and packaging before publication. Dependabot monitors locks, browser requirements, Node engines, Actions and Docker. Conservative compatible lock-only updates can auto-merge after all checks.

Report bugs and suggestions through [GitHub issues](https://github.com/mattiapiazzalunga/onekit/issues) or the [website request board](https://onekit.org/requests/). Contributors can find work in either place.

## License and creator

Created by **[Mattia Piazzalunga](https://www.mattiapiazzalunga.com)**. Copyright © 2026 Mattia Piazzalunga. Licensed under [Apache-2.0](LICENSE); see [NOTICE](NOTICE), [AUTHORS.txt](AUTHORS.txt) and [CONTRIBUTORS.txt](CONTRIBUTORS.txt). Third-party components retain their licenses. External engines are separate programs with their own redistribution obligations.

Export and reimport workflows without processing input files:

```sh
onekit workflow export workflow.1kit -o exported-workflow.1kit
onekit workflow import workflow.1kit -o saved-workflow.1kit
onekit pipeline --steps saved-workflow.1kit input.json -o output.json
```

The web app saves workflows with the `.1kit` extension and imports the same versioned JSON, including block positions and expansion state. Only `.1kit` workflow files are accepted. Workflow files contain tool settings; input files and passwords are excluded from exports. Reenter passwords before running. Browser imports report unsupported tools or option values without replacing the current workflow. CLI-only workflows can still be imported, exported and run with the CLI.

Standard barcodes are available in the QR codes & barcodes category and CLI: `text-to-barcode`, `scan-barcode`, `barcode-to-text`. Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF and ISBN-13 support PNG/SVG, configurable dimensions and check-digit validation. Install `onekit-tools[barcode]` or `onekit-tools[qrcode]`.

The Developer category includes a local [regex tester](docs/regex.md): JavaScript flags, captures, named groups, UTF-16 indices, replacement preview and JSON reports. Browser execution is isolated in a worker; the CLI uses the shared engine through Node.js with a process timeout.

Permanent [PDF and image redaction](docs/redaction.md) is available through `pdf-redact` and `image-redact`. Selected regions become solid black pixels in newly encoded files. PDFs are rebuilt as image-only documents without original text, forms, comments, attachments or metadata; images become opaque PNGs without original metadata or hidden alpha pixels. Original files are left unchanged.

Add configurable PDF text watermarks with `pdf-watermark`: opacity, color, fonts, page ranges, visual positions, rotation and repeated grids. Text and graphics remain in the PDF. See the [watermark guide](docs/watermark.md).

Apply blur, pixelation, box blur, solid cover or grayscale with `image-effects`, on the whole image or selected areas. The browser includes an actual processed preview. See the [image effects guide](docs/image-effects.md).
