pdf-tooling 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. pdf_tooling-0.1.1/.gitignore +54 -0
  2. pdf_tooling-0.1.1/CONTRIBUTING.md +65 -0
  3. pdf_tooling-0.1.1/LICENSE +202 -0
  4. pdf_tooling-0.1.1/Makefile +376 -0
  5. pdf_tooling-0.1.1/NOTICE +42 -0
  6. pdf_tooling-0.1.1/PKG-INFO +206 -0
  7. pdf_tooling-0.1.1/README.md +166 -0
  8. pdf_tooling-0.1.1/TESTING.md +435 -0
  9. pdf_tooling-0.1.1/THIRD_PARTY_LICENSES +3431 -0
  10. pdf_tooling-0.1.1/changelog.md +1322 -0
  11. pdf_tooling-0.1.1/pyproject.toml +223 -0
  12. pdf_tooling-0.1.1/scripts/assert_artifacts.py +58 -0
  13. pdf_tooling-0.1.1/scripts/assert_skips.py +195 -0
  14. pdf_tooling-0.1.1/scripts/gate_parity.py +331 -0
  15. pdf_tooling-0.1.1/scripts/licenses.py +422 -0
  16. pdf_tooling-0.1.1/scripts/measure_gate.py +673 -0
  17. pdf_tooling-0.1.1/src/pdf_toolkit/__init__.py +30 -0
  18. pdf_tooling-0.1.1/src/pdf_toolkit/__main__.py +13 -0
  19. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/__init__.py +106 -0
  20. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/pdfium_raster.py +269 -0
  21. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/pdfium_text.py +98 -0
  22. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/pdfplumber_text.py +176 -0
  23. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/pikepdf_structure.py +517 -0
  24. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/pypdf_structure.py +1025 -0
  25. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/reportlab_compose.py +320 -0
  26. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/soffice_office.py +179 -0
  27. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/subprocess_util.py +375 -0
  28. pdf_tooling-0.1.1/src/pdf_toolkit/adapters/tesseract_ocr.py +405 -0
  29. pdf_tooling-0.1.1/src/pdf_toolkit/cli/__init__.py +7 -0
  30. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_compose.py +175 -0
  31. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_compress.py +232 -0
  32. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_create.py +217 -0
  33. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_decrypt.py +117 -0
  34. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_delete.py +127 -0
  35. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_doctor.py +136 -0
  36. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_encrypt.py +293 -0
  37. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_extract.py +131 -0
  38. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_info.py +178 -0
  39. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_linearize.py +90 -0
  40. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_merge.py +113 -0
  41. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_meta.py +31 -0
  42. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_meta_get.py +144 -0
  43. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_meta_set.py +158 -0
  44. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_ocr.py +199 -0
  45. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_office.py +161 -0
  46. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_permissions.py +105 -0
  47. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_rasterize.py +186 -0
  48. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_reorder.py +122 -0
  49. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_repair.py +98 -0
  50. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_rotate.py +145 -0
  51. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_split.py +126 -0
  52. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_stamp.py +142 -0
  53. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_tables.py +250 -0
  54. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_text.py +196 -0
  55. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_version.py +126 -0
  56. pdf_tooling-0.1.1/src/pdf_toolkit/cli/cmd_watermark.py +172 -0
  57. pdf_tooling-0.1.1/src/pdf_toolkit/cli/common.py +1229 -0
  58. pdf_tooling-0.1.1/src/pdf_toolkit/cli/exit_codes.py +53 -0
  59. pdf_tooling-0.1.1/src/pdf_toolkit/cli/main.py +398 -0
  60. pdf_tooling-0.1.1/src/pdf_toolkit/cli/password.py +287 -0
  61. pdf_tooling-0.1.1/src/pdf_toolkit/errors.py +272 -0
  62. pdf_tooling-0.1.1/src/pdf_toolkit/models.py +555 -0
  63. pdf_tooling-0.1.1/src/pdf_toolkit/ops/__init__.py +10 -0
  64. pdf_tooling-0.1.1/src/pdf_toolkit/ops/compose.py +952 -0
  65. pdf_tooling-0.1.1/src/pdf_toolkit/ops/crypto.py +691 -0
  66. pdf_tooling-0.1.1/src/pdf_toolkit/ops/inspect.py +165 -0
  67. pdf_tooling-0.1.1/src/pdf_toolkit/ops/merge.py +237 -0
  68. pdf_tooling-0.1.1/src/pdf_toolkit/ops/metadata.py +260 -0
  69. pdf_tooling-0.1.1/src/pdf_toolkit/ops/ocr.py +417 -0
  70. pdf_tooling-0.1.1/src/pdf_toolkit/ops/office.py +270 -0
  71. pdf_tooling-0.1.1/src/pdf_toolkit/ops/optimize.py +543 -0
  72. pdf_tooling-0.1.1/src/pdf_toolkit/ops/overlay.py +399 -0
  73. pdf_tooling-0.1.1/src/pdf_toolkit/ops/pagerange.py +419 -0
  74. pdf_tooling-0.1.1/src/pdf_toolkit/ops/pages.py +723 -0
  75. pdf_tooling-0.1.1/src/pdf_toolkit/ops/procpool.py +376 -0
  76. pdf_tooling-0.1.1/src/pdf_toolkit/ops/raster.py +433 -0
  77. pdf_tooling-0.1.1/src/pdf_toolkit/ops/split.py +294 -0
  78. pdf_tooling-0.1.1/src/pdf_toolkit/ops/textract.py +818 -0
  79. pdf_tooling-0.1.1/src/pdf_toolkit/output/__init__.py +77 -0
  80. pdf_tooling-0.1.1/src/pdf_toolkit/output/json.py +50 -0
  81. pdf_tooling-0.1.1/src/pdf_toolkit/output/logging.py +212 -0
  82. pdf_tooling-0.1.1/src/pdf_toolkit/output/table.py +75 -0
  83. pdf_tooling-0.1.1/src/pdf_toolkit/ports/__init__.py +312 -0
  84. pdf_tooling-0.1.1/src/pdf_toolkit/ports/compose.py +218 -0
  85. pdf_tooling-0.1.1/src/pdf_toolkit/ports/ocr.py +130 -0
  86. pdf_tooling-0.1.1/src/pdf_toolkit/ports/office.py +118 -0
  87. pdf_tooling-0.1.1/src/pdf_toolkit/ports/raster.py +112 -0
  88. pdf_tooling-0.1.1/src/pdf_toolkit/ports/structure.py +808 -0
  89. pdf_tooling-0.1.1/src/pdf_toolkit/ports/text.py +246 -0
  90. pdf_tooling-0.1.1/src/pdf_toolkit/safety/__init__.py +67 -0
  91. pdf_tooling-0.1.1/src/pdf_toolkit/safety/_faults.py +86 -0
  92. pdf_tooling-0.1.1/src/pdf_toolkit/safety/atomic.py +931 -0
  93. pdf_tooling-0.1.1/src/pdf_toolkit/safety/confirm.py +160 -0
  94. pdf_tooling-0.1.1/src/pdf_toolkit/safety/naming.py +167 -0
  95. pdf_tooling-0.1.1/src/pdf_toolkit/safety/paths.py +428 -0
  96. pdf_tooling-0.1.1/src/pdf_toolkit/safety/policy.py +71 -0
  97. pdf_tooling-0.1.1/src/pdf_toolkit/safety/tempnames.py +57 -0
  98. pdf_tooling-0.1.1/src/pdf_toolkit/secret.py +134 -0
  99. pdf_tooling-0.1.1/tests/acceptance/__init__.py +11 -0
  100. pdf_tooling-0.1.1/tests/acceptance/_model.py +76 -0
  101. pdf_tooling-0.1.1/tests/acceptance/audit_pdf_01.py +972 -0
  102. pdf_tooling-0.1.1/tests/acceptance/audit_pdf_02.py +596 -0
  103. pdf_tooling-0.1.1/tests/acceptance/audit_pdf_03.py +653 -0
  104. pdf_tooling-0.1.1/tests/acceptance/audit_pdf_04.py +778 -0
  105. pdf_tooling-0.1.1/tests/acceptance/audit_pdf_05.py +643 -0
  106. pdf_tooling-0.1.1/tests/acceptance/audit_pdf_06.py +665 -0
  107. pdf_tooling-0.1.1/tests/acceptance/audit_pdf_09.py +1081 -0
  108. pdf_tooling-0.1.1/tests/acceptance/audit_pdf_23.py +598 -0
  109. pdf_tooling-0.1.1/tests/atomic_harness.py +265 -0
  110. pdf_tooling-0.1.1/tests/conftest.py +381 -0
  111. pdf_tooling-0.1.1/tests/corpus.py +742 -0
  112. pdf_tooling-0.1.1/tests/dryreal.py +83 -0
  113. pdf_tooling-0.1.1/tests/fs_snapshot.py +306 -0
  114. pdf_tooling-0.1.1/tests/golden/README.md +28 -0
  115. pdf_tooling-0.1.1/tests/golden/meta_get.json +29 -0
  116. pdf_tooling-0.1.1/tests/golden/tables_lines.json +57 -0
  117. pdf_tooling-0.1.1/tests/golden/text_layout.json +71 -0
  118. pdf_tooling-0.1.1/tests/helpers/engine_hiding.py +68 -0
  119. pdf_tooling-0.1.1/tests/helpers/pdfstream.py +144 -0
  120. pdf_tooling-0.1.1/tests/integration/test_atomic_crash.py +359 -0
  121. pdf_tooling-0.1.1/tests/integration/test_compose_roundtrip.py +348 -0
  122. pdf_tooling-0.1.1/tests/integration/test_cross_filesystem.py +236 -0
  123. pdf_tooling-0.1.1/tests/integration/test_crypto_roundtrip.py +1211 -0
  124. pdf_tooling-0.1.1/tests/integration/test_ocr.py +925 -0
  125. pdf_tooling-0.1.1/tests/integration/test_office.py +272 -0
  126. pdf_tooling-0.1.1/tests/integration/test_optimize_cli.py +170 -0
  127. pdf_tooling-0.1.1/tests/integration/test_or7_bulk_destructive.py +311 -0
  128. pdf_tooling-0.1.1/tests/integration/test_or7_engine_absent.py +203 -0
  129. pdf_tooling-0.1.1/tests/integration/test_out_dir_planning.py +540 -0
  130. pdf_tooling-0.1.1/tests/integration/test_overlay_preservation.py +278 -0
  131. pdf_tooling-0.1.1/tests/integration/test_pages_cli.py +907 -0
  132. pdf_tooling-0.1.1/tests/integration/test_purity_primitive.py +716 -0
  133. pdf_tooling-0.1.1/tests/integration/test_rasterize_cli.py +411 -0
  134. pdf_tooling-0.1.1/tests/integration/test_rasterize_signals.py +468 -0
  135. pdf_tooling-0.1.1/tests/integration/test_samples_guard_fires.py +137 -0
  136. pdf_tooling-0.1.1/tests/integration/test_split_merge_atomicity.py +150 -0
  137. pdf_tooling-0.1.1/tests/integration/test_split_merge_cli.py +275 -0
  138. pdf_tooling-0.1.1/tests/integration/test_split_merge_roundtrip.py +112 -0
  139. pdf_tooling-0.1.1/tests/integration/test_text_tables_cli.py +440 -0
  140. pdf_tooling-0.1.1/tests/pagetree.py +134 -0
  141. pdf_tooling-0.1.1/tests/pdfium_text.py +55 -0
  142. pdf_tooling-0.1.1/tests/registry.py +1707 -0
  143. pdf_tooling-0.1.1/tests/samples_guard.py +142 -0
  144. pdf_tooling-0.1.1/tests/test_acceptance_audit.py +379 -0
  145. pdf_tooling-0.1.1/tests/test_assert_skips.py +174 -0
  146. pdf_tooling-0.1.1/tests/test_changelog_history.py +477 -0
  147. pdf_tooling-0.1.1/tests/test_cli_contract.py +2477 -0
  148. pdf_tooling-0.1.1/tests/test_cli_spine.py +1737 -0
  149. pdf_tooling-0.1.1/tests/test_corpus.py +200 -0
  150. pdf_tooling-0.1.1/tests/test_coverage_policy.py +469 -0
  151. pdf_tooling-0.1.1/tests/test_derived_dimensions.py +516 -0
  152. pdf_tooling-0.1.1/tests/test_docs_antirot.py +1168 -0
  153. pdf_tooling-0.1.1/tests/test_docstring_pointers.py +190 -0
  154. pdf_tooling-0.1.1/tests/test_doctor.py +510 -0
  155. pdf_tooling-0.1.1/tests/test_gate_budget.py +1037 -0
  156. pdf_tooling-0.1.1/tests/test_gate_parity.py +619 -0
  157. pdf_tooling-0.1.1/tests/test_honesty_claims.py +583 -0
  158. pdf_tooling-0.1.1/tests/test_import_boundaries.py +2698 -0
  159. pdf_tooling-0.1.1/tests/test_info.py +1197 -0
  160. pdf_tooling-0.1.1/tests/test_license_policy.py +520 -0
  161. pdf_tooling-0.1.1/tests/test_pagerange.py +1028 -0
  162. pdf_tooling-0.1.1/tests/test_password_leaks.py +1523 -0
  163. pdf_tooling-0.1.1/tests/test_samples.py +1421 -0
  164. pdf_tooling-0.1.1/tests/test_secret_leak_sweeps.py +442 -0
  165. pdf_tooling-0.1.1/tests/test_testdata.py +177 -0
  166. pdf_tooling-0.1.1/tests/test_usage_envelope.py +1443 -0
  167. pdf_tooling-0.1.1/tests/unit/test_atomic_writer.py +1039 -0
  168. pdf_tooling-0.1.1/tests/unit/test_compose.py +983 -0
  169. pdf_tooling-0.1.1/tests/unit/test_confirm.py +384 -0
  170. pdf_tooling-0.1.1/tests/unit/test_create.py +372 -0
  171. pdf_tooling-0.1.1/tests/unit/test_golden.py +75 -0
  172. pdf_tooling-0.1.1/tests/unit/test_merge.py +367 -0
  173. pdf_tooling-0.1.1/tests/unit/test_meta_group.py +107 -0
  174. pdf_tooling-0.1.1/tests/unit/test_metadata.py +402 -0
  175. pdf_tooling-0.1.1/tests/unit/test_name_template.py +143 -0
  176. pdf_tooling-0.1.1/tests/unit/test_optimize.py +624 -0
  177. pdf_tooling-0.1.1/tests/unit/test_output_flags.py +56 -0
  178. pdf_tooling-0.1.1/tests/unit/test_overlay.py +1032 -0
  179. pdf_tooling-0.1.1/tests/unit/test_pages.py +808 -0
  180. pdf_tooling-0.1.1/tests/unit/test_password_hint.py +240 -0
  181. pdf_tooling-0.1.1/tests/unit/test_password_resolution.py +367 -0
  182. pdf_tooling-0.1.1/tests/unit/test_ports_registry.py +339 -0
  183. pdf_tooling-0.1.1/tests/unit/test_procpool.py +235 -0
  184. pdf_tooling-0.1.1/tests/unit/test_raster.py +1318 -0
  185. pdf_tooling-0.1.1/tests/unit/test_registry.py +400 -0
  186. pdf_tooling-0.1.1/tests/unit/test_safety_paths.py +518 -0
  187. pdf_tooling-0.1.1/tests/unit/test_samples_guard.py +99 -0
  188. pdf_tooling-0.1.1/tests/unit/test_secret.py +109 -0
  189. pdf_tooling-0.1.1/tests/unit/test_split.py +380 -0
  190. pdf_tooling-0.1.1/tests/unit/test_subprocess_util.py +263 -0
  191. pdf_tooling-0.1.1/tests/unit/test_tempnames.py +74 -0
  192. pdf_tooling-0.1.1/tests/unit/test_textract.py +726 -0
  193. pdf_tooling-0.1.1/tests/unit/test_verb_help_content.py +312 -0
@@ -0,0 +1,54 @@
1
+ # Dependencies
2
+ node_modules/
3
+ venv/
4
+ .venv/
5
+ __pycache__/
6
+
7
+ # Build
8
+ dist/
9
+ build/
10
+ target/
11
+
12
+ # Environment
13
+ .env
14
+ .env.local
15
+ .env.*.local
16
+
17
+ # IDE
18
+ .idea/
19
+ .vscode/
20
+ *.swp
21
+ *.swo
22
+
23
+ # OS
24
+ .DS_Store
25
+ Thumbs.db
26
+
27
+ # Python tooling caches and coverage artefacts produced by this repo's own targets
28
+ .pytest_cache/
29
+ .ruff_cache/
30
+ .mypy_cache/
31
+ .coverage
32
+ .coverage.*
33
+ coverage.xml
34
+ htmlcov/
35
+ *.egg-info/
36
+
37
+ # make cover's mkdir-based concurrency guard (B-090). Removed on every exit
38
+ # path by its own trap; this entry only matters if that trap is bypassed
39
+ # (e.g. SIGKILL) and the lock dir is left stranded in a checkout.
40
+ .make-cover.lock/
41
+
42
+ # Dedicated license-measurement environments built by scripts/licenses.py
43
+ # (PDF-02 Design §4.2). The inventory is generated from a pinned --no-dev
44
+ # closure, never from the ambient venv, so these are build scratch, not sources.
45
+ .venv-licenses/
46
+ .venv-licenses-dev/
47
+
48
+ # Per-interpreter environments built by `make ci PYTHON=<x.y>` (PDF-28 B-029,
49
+ # AC15). `.venv/` above is the exact-name entry for the ambient venv; this is
50
+ # deliberately a separate glob rather than widening it to `.venv*/`.
51
+ .venv-py*/
52
+
53
+ # Scratch space for manual probing against real documents. Never committed.
54
+ .scratch/
@@ -0,0 +1,65 @@
1
+ # Contributing
2
+
3
+ Thanks for considering a contribution. This document is short on purpose: everything it asks for is mechanically checked, so you can verify you have satisfied it before you push.
4
+
5
+ ## Developer Certificate of Origin
6
+
7
+ Every commit must be signed off:
8
+
9
+ ```bash
10
+ git commit -s -m "feat: add the thing"
11
+ ```
12
+
13
+ That adds a `Signed-off-by:` trailer, which is your statement that you have the right to submit the work under this project's licence. There is no CLA. Commits without the trailer are rejected.
14
+
15
+ ## Commit conventions
16
+
17
+ Conventional commit subjects: `feat|fix|docs|refactor|test|chore`, imperative mood, no trailing period.
18
+
19
+ Work that implements a planned specification carries that specification's tag as a subject prefix, so the change and its rationale can be found from either direction:
20
+
21
+ ```
22
+ [PDF-NN] feat: <what the specification delivers>
23
+ ```
24
+
25
+ Write the subject about the *why*, not the *what* — the diff already says what changed.
26
+
27
+ Each implemented specification appends **its own** entry to `changelog.md`, in the same commit as the code. Entries go directly below the anchor comment, newest first. Never batch entries, never back-fill one later, and never edit an entry that has landed — a correction is a new entry with a new date.
28
+
29
+ ## The local gate
30
+
31
+ ```bash
32
+ uv sync
33
+ make ci
34
+ ```
35
+
36
+ `make ci` is a **subset** of CI, run with the same commands. It does not predict CI — `.github/gate-parity.toml` declares exactly what runs locally and what does not, why, and where a local counterpart exists; `make ci`'s own epilogue prints that gap on every run, and `make help` lists every target it does not run.
37
+
38
+ Three things about the gate are deliberate and should not be "fixed":
39
+
40
+ - **No target degrades.** No recipe ends in `|| true`, is prefixed with `-`, or swallows a missing tool. A gate that cannot fail is not a gate; a check that quietly did not run is worse than one that failed loudly.
41
+ - **`make secret-scan` needs the `gitleaks` binary** and fails loudly when it is absent, rather than passing. It is not part of `make ci` locally: the local binary, when present, is a different scanner version than the one CI pins (`GITLEAKS_VERSION` in `ci.yml`), so running it inside `make ci` would trade a known gap for an unnoticed one — same command, different check.
42
+ - **Some CI checks are not part of `make ci` at all, on purpose.** A few (`make engines-gate`, `make licenses-check`, `make artifacts-check`) are runnable on demand but cost real wall-clock; others need CI's own host, matrix, or a pinned binary and have no local form. `.github/gate-parity.toml` is the record of which is which.
43
+
44
+ Individual targets, when you want a faster loop:
45
+
46
+ ```bash
47
+ make fmt # format the tree
48
+ make lint # lint
49
+ make typecheck # strict type checking of src/
50
+ make test # the test suite
51
+ make test-e2e # only the subprocess-level CLI tests
52
+ ```
53
+
54
+ `make help` lists every target.
55
+
56
+ ## What a change must not do
57
+
58
+ - **Add anything under AGPL, GPL or LGPL to the call graph** — not as an import, not as an optional extra, not as a `subprocess` fallback. This is a licence-compatibility rule, not a preference, and it is checked in CI.
59
+ - **Add a runtime dependency.** The runtime stack is declared up front and deliberately frozen: the licence manifest is generated from the lockfile and diffed in CI, so a mid-stream addition turns that check red on an unrelated commit and the failure looks like something else entirely. If you believe you need one, raise it before writing the code.
60
+ - **Change an exit code or a structured output field.** Both are public API. Adding is fine; renumbering and renaming are major-version changes.
61
+ - **Import the CLI framework below the CLI layer**, or write to a user-visible path outside the safety layer. Both are enforced by tests, not by review alone.
62
+
63
+ ## Tests
64
+
65
+ See `TESTING.md` for how each suite is run and what a legitimate skip looks like. The short version: a test that cannot run because an engine or a corpus is missing must **skip visibly, with a reason** — never pass silently, and never be deleted so the suite turns green.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Armando Herra
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.