From 8795540e5dc891fa1317eecfda9f4f0453d61ee7 Mon Sep 17 00:00:00 2001 From: lukisch <55554266+lukisch@users.noreply.github.com> Date: Sun, 1 Nov 2026 23:32:21 +0100 Subject: [PATCH] chore(hygiene): untrack MARKETING-LOG.txt, add gitignore pattern defense, harden manage_translations UTF-8 & contract test [G 2026-11-01] --- .gitignore | 5 + CHANGELOG.md | 6 + MARKETING-LOG.txt | 358 ----------------------------------------- manage_translations.py | 19 ++- tests/test_metadata.py | 11 ++ 5 files changed, 40 insertions(+), 359 deletions(-) delete mode 100644 MARKETING-LOG.txt diff --git a/.gitignore b/.gitignore index 140d261..31e546a 100644 --- a/.gitignore +++ b/.gitignore @@ -137,3 +137,8 @@ DONE.md # Interne Befunde (lokal) BEFUNDE.md _after-care/ + +# Interne Marketing- und Verarbeitungsdokumente (T-20260926-455218633 / GITHUB-POLICY.md §4) +MARKETING-LOG.txt +*MARKETING-LOG.txt +*STATUS-LOG.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f65ce6..ad30938 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ Format basiert auf [Keep a Changelog](https://keepachangelog.com/de/1.1.0/). ## [Unreleased] +### Repository and gitignore hygiene (2026-10-31) +- Untracked internal marketing and processing document (`MARKETING-LOG.txt`) in compliance with user policy T-20260926-455218633 and GITHUB-POLICY.md §4. +- Added pattern protection for `MARKETING-LOG.txt`, `*MARKETING-LOG.txt`, and `*STATUS-LOG.txt` in `.gitignore`. +- Hardened `manage_translations.py` for UTF-8 stream output on Windows consoles and set default project directory dynamically to the script's root path. +- Added automated contract test in `tests/test_metadata.py` verifying that internal marketing logs remain untracked. + ### Documentation scope correction (2026-10-12) - Current documentation distinguishes local OCR processing from network enforcement: the application can request missing Tesseract language data from GitHub and does not provide a firewall or sandbox. - Third-party license pages are selected information, not a complete SBOM, compliance audit, or copyleft-isolation certification. Process boundaries do not establish a legal boundary. diff --git a/MARKETING-LOG.txt b/MARKETING-LOG.txt deleted file mode 100644 index 24d0ede..0000000 --- a/MARKETING-LOG.txt +++ /dev/null @@ -1,358 +0,0 @@ -# MARKETING-LOG — doc-bricks/PDFtoPDFocr -# Tracked Pfad A & Pfad B Milestones, Technical Hygiene, Governance & Verification - -# Scope correction (2026-10-12): Entries below are dated historical descriptions and reported checks, -# not current independent verification. Current behavior and limits are described in README.md, -# SECURITY.md, PRIVACY_POLICY.md, and THIRD_PARTY_LICENSES.md. Local OCR does not mean zero network -# access, a sandbox, a security certification, or a license-compliance guarantee. - -================================================================================ -[2026-10-01 23:55 CEST] [PFAD_B_DISCOVERABILITY_AND_DESIGN] -Repository: doc-bricks/PDFtoPDFocr -Local Canonical: [maintainer local checkout] -Branch: master -Version: 1.1.4 (Strictly Frozen - No Version Bump per T-20260920-167562623) -License: MIT (SPDX-License-Identifier: MIT) -Maintainer: doc-bricks Team / Lukas Geiger (lukas@open-bricks.org / support@lukasgeiger.com) -Security Contact: security@open-bricks.org, security@ellmos.ai - -1. VISUAL FOUR-VIEW ARCHITECTURAL TOPOLOGY (ASCII TOPOLOGY PROJECTION) --------------------------------------------------------------------------------- -- Integrated ASCII Four-View Architectural Topology into Section 2 of README.md and README_de.md: - * [VIEW 1: INGESTION, DRAG-AND-DROP QUEUE & ACCESSIBILITY]: PySide6 Desktop GUI, drag-and-drop batch queue, WCAG AA screen-reader support, 6-language i18n, unprivileged execution (INV-UNPRIV-02). - * [VIEW 2: ASYNC ORCHESTRATION, WORKER THREAD & DISPATCHER ENGINE]: Non-blocking QThread worker execution, cancellation & safe lease guard, portable job manifest (INV-MANIFEST-07), fail-closed error trapping (INV-FAILCLOSED-09). - * [VIEW 3: CORE OCR PIPELINE, POPPLER RASTERIZER & TESSERACT ENGINE]: Stream rasterization (INV-BOUNDED-05), alpha normalizer, portable Tesseract engine with official GitHub traineddata auto-download, pikepdf lossless PDF assembler (INV-NONDEST-03). - * [VIEW 4: AIR-GAP DEFENSE PERIMETER, ZERO-EGRESS & GOVERNANCE BOUNDARY]: 100% local-first zero-egress perimeter (INV-LOCAL-01), subprocess isolation (INV-ISOLATION-04), permissive MIT/Apache/MPL runtime, Level 1 SBOM, 48h security SLA (INV-SLA-10). -- Harmonized bilateral HTML anchors #four-view-architectural-topology-projection and #vier-sichten-architektur-topologie-projektion. - -2. LEVEL 1 SBOM TEXT COMPANION RE-AUDIT (THIRD_PARTY_LICENSES.txt) --------------------------------------------------------------------------------- -- Re-audited THIRD_PARTY_LICENSES.txt to Stand: 2026-10-01. -- Validated all 10 architecture and governance invariants (INV-LOCAL-01 through INV-SLA-10). -- Certified unprivileged RunAsInvoker non-elevation (INV-UNPRIV-02) and subprocess isolation for Tesseract and Poppler binaries. -- Certified zero network copyleft (AGPL/SSPL) and clean dynamic linking compliance for PySide6 (LGPL-3.0). - -3. 4 TARGET PERSONAS & HIGH-INTENT DISCOVERABILITY --------------------------------------------------------------------------------- -- [PERSONA-01] Legal, Healthcare & Regulatory Compliance Officers: Strict GDPR/HIPAA zero-egress document OCR, no cloud leaks. -- [PERSONA-02] Archivists, Historians & Academic Researchers: Unlimited local batch queues for multi-frame TIFF and historical PDFs. -- [PERSONA-03] Privacy-Conscious Knowledge Workers & Desktop Enthusiasts: Free MIT open-source desktop tool with no account, no subscriptions, and portable execution. -- [PERSONA-04] Automated Pipeline Integrators & Document Workflow Engineers: Structured exchange via pdftopdfocr-job-v1.json and llms.txt integration. - -4. 10-DIMENSION COMPARATIVE MATRIX VS. 5 ALTERNATIVES --------------------------------------------------------------------------------- -- Maintained detailed comparative evaluation vs. Adobe Acrobat Pro, ABBYY FineReader PDF, OCRmyPDF (CLI), and Cloud SaaS (Smallpdf/iLovePDF) mapped against INV-LOCAL-01 through INV-SLA-10. - -5. PEP 621 METADATA & HIGH-INTENT SEO ENRICHMENT --------------------------------------------------------------------------------- -- Expanded pyproject.toml keywords array with high-intent discovery terms: - "zero-egress", "offline-first", "batch-ocr", "accessibility". -- Synchronized project URLs for Level 1 SBOM, Plain-Text License, Contributing, and Notice. - -6. NON-AUTOMATED MARKETING & DESIGN RECOMMENDATIONS --------------------------------------------------------------------------------- -- Recommendation 1 (Visuals): Capture dark-mode high-DPI screenshots of the queue with active status badges for Windows Store and website promotion. -- Recommendation 2 (Video Demo): Produce a 30-second silent GIF/WebM showing drag-and-drop batch OCR of 5 documents with instant local conversion. -- Recommendation 3 (Distribution): Provide a GitHub Release asset tagged v1.1.4 with pre-bundled portable Tesseract/Poppler zip archive for zero-prerequisite evaluation. - -7. AUTOMATED CONTRACT TEST HARNESS & GOVERNANCE VERIFICATION --------------------------------------------------------------------------------- -- Expanded tests/test_metadata.py with contract tests for ASCII Four-View Topology, Level 1 SBOM 2026-10-01 currency, PEP 621 SEO keywords, and CHANGELOG/MARKETING-LOG recency. -- Verified 100% test pass rate via pytest (145/145 passed), ruff check clean, compileall clean, git diff --check clean. - -================================================================================ -[2026-09-30 16:30 CEST] [PFAD_A_TECHNICAL_HYGIENE_AND_CI_HARDENING] -Repository: doc-bricks/PDFtoPDFocr -Local Canonical: [maintainer local checkout] -Branch: master -Version: 1.1.4 (Strictly Frozen - No Version Bump per T-20260920-167562623) -License: MIT (SPDX-License-Identifier: MIT) -Maintainer: doc-bricks Team / Lukas Geiger (lukas@open-bricks.org / support@lukasgeiger.com) -Security Contact: security@open-bricks.org, security@ellmos.ai - -1. FORMAL NOTICE FILE & ATTRIBUTION --------------------------------------------------------------------------------- -- Created root NOTICE attribution file honoring Lukas Geiger, doc-bricks, and open-bricks contributors under MIT. -- Added reciprocal cross-references between LICENSE, NOTICE, THIRD_PARTY_LICENSES.md, and THIRD_PARTY_LICENSES.txt. -- Added NOTICE and THIRD_PARTY_LICENSES.txt to pyproject.toml license-files array. - -2. LEVEL 1 SBOM TEXT COMPANION RE-AUDIT (THIRD_PARTY_LICENSES.txt) --------------------------------------------------------------------------------- -- Re-audited THIRD_PARTY_LICENSES.txt to Stand: 2026-09-30. -- Confirmed full compliance with all 10 architecture and governance invariants (INV-LOCAL-01 through INV-SLA-10). -- Certified unprivileged RunAsInvoker non-elevation (INV-UNPRIV-02) and subprocess isolation for Tesseract and Poppler binaries. - -3. CI LIFECYCLE WORKFLOWS & GOVERNANCE --------------------------------------------------------------------------------- -- .github/workflows/auto-assign.yml: PR and Issue auto-assigner (actions/github-script@v7, timeout 5m, cancel-in-progress: true). -- .github/workflows/label-sync.yml: Label synchronization from .github/labels.yml (EndBug/label-sync@v2, timeout 5m, cancel-in-progress: true). -- .github/labels.yml: Canonical 11 issue/PR labels per GOVERNANCE.md §4.2. -- .github/workflows/welcome.yml: First interaction welcome bot (actions/first-interaction@v3, timeout 5m, cancel-in-progress: true). - -4. MULTI-HOST CLOUD-SYNC, LOCK & CACHE DEFENSE (.gitignore) --------------------------------------------------------------------------------- -- Hardened .gitignore against host tokens (*-IDEAPAD*, *-IDEAPAD-GEI*, *_WORKSTATION*, *_WORKSTATION-LG*, *-WORKSTATION.*, *-WORKSTATION-LG.*, *-MacBook*). -- Hardened canonical locks (LOCK.dev.*, LOCK.antigravity.*, LOCK.bugsearch.*, .automation-lock). -- Hardened temp & cache files (Desktop.ini, ehthumbs.db, *.swo, TASKPLAN_*.md, .pytest_temp/, .pytest_tmp*). - -5. PEP 621 STANDARDIZATION & PYTEST HARDENING --------------------------------------------------------------------------------- -- pyproject.toml: license-files = ["LICENSE", "NOTICE", "THIRD_PARTY_LICENSES.md", "THIRD_PARTY_LICENSES.txt"] -- pyproject.toml: project.urls enriched with Contributing, Plain-Text License, Third-Party Licenses (Text), Level 1 SBOM, Notice. -- pytest.ini & pyproject.toml: addopts includes --basetemp=.pytest_temp; norecursedirs includes .pytest_temp, .pytest_tmp*, .hypothesis, .turbo, .nyc_output, .tox. - -6. CONTRIBUTING GUIDELINES ENHANCEMENT --------------------------------------------------------------------------------- -- CONTRIBUTING.md enriched with Quality Gates, Plan D Local Dev Setup, and Version-Freeze discipline. - -7. AUTOMATED CONTRACT TEST SUITE EXPANSION --------------------------------------------------------------------------------- -- Expanded tests/test_metadata.py with contract tests for NOTICE, CI workflows, labels.yml, welcome.yml, CONTRIBUTING, Level 1 SBOM invariants, and CHANGELOG [Unreleased] hygiene. -- Verified 100% test pass rate via pytest, ruff clean, compileall clean, git diff --check clean. - -================================================================================ -[2026-09-21 15:00 CEST] [PFAD_B_DISCOVERABILITY_AND_DESIGN] -Repository: doc-bricks/PDFtoPDFocr -Local Canonical: [maintainer local checkout] -Branch: master -Version: 1.1.4 (Strictly Frozen - No Version Bump per T-20260920-167562623) -License: MIT (SPDX-License-Identifier: MIT) -Maintainer: doc-bricks Team / Lukas Geiger (lukas@open-bricks.org / support@lukasgeiger.com) -Security Contact: security@open-bricks.org, security@ellmos.ai - -1. 18-POINT BILINGUAL NAVIGATION & RECIPROCAL ANCHORS --------------------------------------------------------------------------------- -- Upgraded dual-language documentation (README.md and README_de.md) from 16 to 18 points: - 1. Visual Showcase & Interface Overview / Visuelle Showcase-Galerie & Benutzeroberfläche - (HTML anchors: #visual-showcase / #visuelle-showcase-galerie) - 2. System Architecture & 5-Layer Topology / Systemarchitektur & 5-Schichten-Topologie - (HTML anchors: #system-architecture--component-workflow / #systemarchitektur--komponenten-workflow) - 3. Local Data Flow & Document OCR Processing Lifecycle / Lokaler Datenfluss & Dokument-OCR-Verarbeitungslebenszyklus - (HTML anchors: #local-data-flow--privacy-isolation / #lokaler-datenfluss--datenschutz-isolation) - 4. Quick Start & Key Operations / Schnelleinstieg & Kernabläufe - (HTML anchors: #quick-start--key-operations / #schnelleinstieg--kernabläufe) - 5. Core Features & Performance Capabilities / Funktionen & Leistungsmerkmale - (HTML anchors: #core-features / #funktionen--features) - 6. Target Personas & High-Intent Search Intent / Zielgruppen & Auffindbarkeit - (HTML anchors: #target-personas--discoverability / #zielgruppen--auffindbarkeit) - 7. 10-Dimension Comparative Matrix vs. 5 Alternatives / 10-Dimensionen-Vergleichsmatrix vs. 5 Alternativen - (HTML anchors: #comparative-matrix--alternatives / #vergleichsmatrix--alternativen) - 8. Accessibility, WCAG Ergonomics & Keyboard Shortcuts / Barrierefreiheit, WCAG-Ergonomie & Tastenkürzel - (HTML anchors: #accessibility--keyboard-shortcuts / #barrierefreiheit--tastenkürzel) - 9. Requirements & Platform Matrix / Voraussetzungen & Plattformmatrix - (HTML anchors: #requirements--platform-matrix / #voraussetzungen--plattformmatrix) - 10. Installation & Portable Setup / Installation & Portables Setup - (HTML anchors: #installation--portable-setup / #installation--portables-setup) - 11. Usage & Execution Guidelines / Nutzung & Ausführungsrichtlinien - (HTML anchors: #usage--execution-guidelines / #nutzung--ausführungsrichtlinien) - 12. Automated Testing & Quality Verification / Automatisierte Tests & Qualitätsprüfung - (HTML anchors: #tests--quality-verification / #tests--qualitätsprüfung) - 13. Sibling Tools & Ecosystem Integration / Geschwister-Tools & Ökosystem-Integration - (HTML anchors: #sibling-tools--ecosystem / #geschwister-tools--ökosystem) - 14. Level 1 SBOM & Third-Party Licenses Transparency / Level 1 SBOM & Drittanbieter-Lizenzen-Transparenz - (HTML anchors: #third-party-licenses--transparency / #drittanbieter-lizenzen--transparenz) - 15. Privacy & Security Model (Invariants INV-LOCAL-01..INV-SLA-10) / Datenschutz- & Sicherheitsmodell - (HTML anchors: #privacy--security-model / #datenschutz--sicherheitsmodell) - 16. EXE & Distribution Packaging (Windows Store MSIX & Portable) / EXE & Distributions-Packaging - (HTML anchors: #exe--distribution-packaging / #exe--distributions-packaging) - 17. Machine-Readable LLM Context (llms.txt) / Maschinenlesbarer LLM-Kontext (llms.txt) - (HTML anchors: #machine-readable-llm-context / #maschinenlesbarer-llm-kontext) - 18. Statutory Notice (§ 521 BGB) & License / Gesetzlicher Hinweis (§ 521 BGB) & Lizenz - (HTML anchors: #statutory-notice--license / #contributing--license / #gesetzlicher-hinweis--lizenz / #mitwirken--lizenz) -- Full reciprocal HTML anchor parity across English and German documents. - -2. DUAL MERMAID DIAGRAMS (5-LAYER TOPOLOGY & ZERO-SEMICOLON LIFECYCLE) --------------------------------------------------------------------------------- -- Diagram 1 (System Topology): Modernized 5-layer flowchart TD: - * Layer 1: User Interface & Ingestion (PySide6, PDFListWidget, translations.json, WCAG AA A11y) - * Layer 2: Async Orchestration & Dispatcher (Task Dispatcher, QThread Worker, Safe Lease Guard, Job Manifest Generator) - * Layer 3: Core OCR & Transformation Pipeline (pdf2image Poppler Rasterizer, Image Normalizer, Tesseract OCR Engine, pikepdf Output Assembler) - * Layer 4: Local Storage & Security Boundary (Local Filesystem, Non-Destructive Preserver, Security & Invariants Engine) - * Layer 5: Packaging & Distribution Artifacts (PyInstaller Bundle Engine, Windows Store MSIX Bridge) -- Diagram 2 (Lifecycle Sequence): Full asynchronous document processing sequenceDiagram with autonumber and 0 semicolons: - * Ingestion -> Asynchronous Dispatch -> Per-Document Page Rasterization / Normalization -> Tesseract Text Extraction -> pikepdf Searchable Assembly -> Non-Destructive File Save -> Optional Portable Manifest Export. - -3. TARGET PERSONAS & HIGH-INTENT KEYWORD MATRIX (EN / DE) --------------------------------------------------------------------------------- -- [PERSONA-01] Legal, Healthcare & Regulatory Compliance Officers: - * Zero-egress local processing under GDPR/HIPAA without cloud leaks; unprivileged user mode; non-destructive preservation of original evidence files. -- [PERSONA-02] Archivists, Historians & Academic Researchers: - * Unlimited local batch conversion for PDFs and raw image queues (JPG, PNG, multi-page TIFF); automated language model downloads; auto-merge. -- [PERSONA-03] Privacy-Conscious Knowledge Workers & Desktop Enthusiasts: - * Lightweight MIT desktop tool without subscriptions, logins, or intrusive background daemons; portable zero-install option; keyboard-first ergonomics. -- [PERSONA-04] Automated Pipeline Integrators & Document Workflow Engineers: - * Deterministic job manifest export (pdftopdfocr-job-v1.json); fail-closed error handling; machine-readable llms.txt context. -- High-Intent SEO Search Queries: - * EN: "local pdf ocr converter windows 10 11", "tesseract ocr batch desktop gui python pyside6", "offline searchable pdf creator zero egress gdpr", "convert scanned tiff to searchable pdf desktop free", "portable pdf ocr tesseract without cloud" - * DE: "gescannte pdf durchsuchbar machen lokal kostenlos", "offline pdf ocr texterkennung windows tesseract", "datenschutzkonforme ocr software ohne cloud dsgvo", "tiff mehrseitig in durchsuchbare pdf umwandeln", "portable ocr software ohne installation windows" - -4. 10-DIMENSION COMPARATIVE MATRIX VS. 5 ALTERNATIVES --------------------------------------------------------------------------------- -| Evaluation Dimension | Governance Invariant | PDFtoPDFocr (doc-bricks) | Adobe Acrobat Pro | ABBYY FineReader PDF | OCRmyPDF (CLI) | Cloud SaaS (Smallpdf/iLovePDF) | -|---|---|:---:|:---:|:---:|:---:|:---:| -| Zero-Egress Privacy | INV-LOCAL-01 | 100% Offline (Local) | Cloud sync default | Cloud options | 100% Offline (Local) | No (Cloud Upload Mandatory) | -| Privilege Non-Elevation | INV-UNPRIV-02 | Standard User Mode | Admin daemon / Services | Admin daemon / Services | Depends on host/Docker | Remote Cloud Host | -| Non-Destructive Safety | INV-NONDEST-03 | Strict _ocred.pdf | Overwrites / Prompts | Overwrites / Prompts | In-place or new file | Creates cloud object | -| Process & Copyleft Isolation | INV-ISOLATION-04 | Subprocess Boundary | Closed-source proprietary | Closed-source proprietary | MPL-2.0 / Subprocesses | Closed SaaS backend | -| Memory Boundedness | INV-BOUNDED-05 | Bounded Page Stream | Heavy background cache | Heavy background cache | Large PDF memory spikes | Server-side allocation | -| Portability / Zero-Install | INV-PORTABLE-06 | Portable folder / exe | Heavy system installer | Heavy system installer | Requires package manager | Browser client | -| Verifiable Job Manifests | INV-MANIFEST-07 | pdftopdfocr-job-v1.json | Proprietary app logs | Proprietary app logs | Terminal stdout/stderr | JSON REST response | -| Screen-Reader & Keyboard A11y | INV-A11Y-08 | Full WCAG AA & Hotkeys | Standard accessibility | Standard accessibility | CLI terminal a11y only | Web UI varies | -| Fail-Closed Error Trapping | INV-FAILCLOSED-09 | Per-Page Error Skip | Modal dialog interruptions | Modal dialog interruptions | CLI non-zero exit code | HTTP 5xx error responses | -| Security Response SLA | INV-SLA-10 | 48h Response / 5d Triage | Standard enterprise | Standard enterprise | Best-effort GitHub | Ticket queue | - -5. STATUTORY NOTICE PURSUANT TO § 521 BGB (GEFÄLLIGKEITSRECHT) --------------------------------------------------------------------------------- -- Incorporated German statutory disclaimer for gratuitous open-source software provision (§ 521 BGB) into both README.md and README_de.md. -- Limits liability to intent and gross negligence; preserves standard MIT open-source warranty exclusion. - -6. LEVEL 1 SBOM & INVARIANT CROSS-REFERENCE MATRIX AUDIT --------------------------------------------------------------------------------- -- Audit Date updated to 2026-09-21 in THIRD_PARTY_LICENSES.md. -- Added Invariant Cross-Reference & Verification Matrix mapping all 10 invariants (INV-LOCAL-01 through INV-SLA-10) to implementation files, test files, and verification status. -- Added formal Unprivileged RunAsInvoker Non-Elevation Certification and Subprocess Boundary & Copyleft Isolation Guarantee. - -7. METADATA & CONTRACT TEST EXPANSION --------------------------------------------------------------------------------- -- Updated tests/test_metadata.py with assertions verifying: - * 18-point quick navigation and reciprocal anchor parity across both READMEs - * Reciprocal HTML anchor tags () for all 18 sections - * Dual Mermaid diagrams syntax (flowchart TD + sequenceDiagram with autonumber) - * Target personas ([PERSONA-01] to [PERSONA-04]) and high-intent query contracts - * 10-dimension comparative matrix and 10 governance invariants in READMEs and MARKETING-LOG.txt - * § 521 BGB statutory limitation notice in both READMEs - * Level 1 SBOM and Invariant Cross-Reference table in THIRD_PARTY_LICENSES.md -- Test suite passing 100% green. - -================================================================================ -[2026-09-12 11:45 CEST] [PFAD_B_DISCOVERABILITY_AND_DESIGN] -Repository: doc-bricks/PDFtoPDFocr -Local Canonical: [maintainer local checkout] -Branch: master -Version: 1.1.3 -License: MIT (SPDX-License-Identifier: MIT) -Maintainer: doc-bricks Team / Lukas Geiger (lukas@open-bricks.org / support@lukasgeiger.com) -Security Contact: security@open-bricks.org, security@ellmos.ai - -1. DISCOVERABILITY, NAVIGATION & PEP 621 METADATA --------------------------------------------------------------------------------- -- Upgraded dual-language documentation (README.md and README_de.md) with a 16-point - quick navigation architecture featuring 100% reciprocal anchor parity: - 1. System Architecture & Component Workflow / Systemarchitektur & Komponenten-Workflow - 2. Local Data Flow & Privacy Isolation / Lokaler Datenfluss & Datenschutz-Isolation - 3. Quick Start & Key Operations / Schnelleinstieg & Kernabläufe - 4. Core Features / Funktionen & Features - 5. Target Personas & Discoverability / Zielgruppen & Auffindbarkeit - 6. Accessibility & Keyboard Shortcuts / Barrierefreiheit & Tastenkürzel - 7. Requirements & Platform Matrix / Voraussetzungen & Plattformmatrix - 8. Installation & Portable Setup / Installation & Portables Setup - 9. Usage & Execution Guidelines / Nutzung & Ausführungsrichtlinien - 10. Tests & Quality Verification / Tests & Qualitätsprüfung - 11. Sibling Tools & Ecosystem / Geschwister-Tools & Ökosystem - 12. Third-Party Licenses & Transparency / Drittanbieter-Lizenzen & Transparenz - 13. Privacy & Security Model / Datenschutz & Sicherheitsmodell - 14. EXE & Distribution Packaging / EXE & Distributions-Packaging - 15. Machine-Readable LLM Context / Maschinenlesbarer LLM-Kontext - 16. Contributing & License / Mitwirken & Lizenz -- Enriched pyproject.toml PEP 621 [project.urls] with standard discoverability endpoints: - * "Homepage" -> https://github.com/doc-bricks/PDFtoPDFocr - * "Repository" -> https://github.com/doc-bricks/PDFtoPDFocr.git - * "Bug Tracker" -> https://github.com/doc-bricks/PDFtoPDFocr/issues - * "Changelog" -> https://github.com/doc-bricks/PDFtoPDFocr/blob/master/CHANGELOG.md - * "Third-Party Licenses" -> https://github.com/doc-bricks/PDFtoPDFocr/blob/master/THIRD_PARTY_LICENSES.md - * "Marketing Log" -> https://github.com/doc-bricks/PDFtoPDFocr/blob/master/MARKETING-LOG.txt - * "LLM Ready" -> https://github.com/doc-bricks/PDFtoPDFocr/blob/master/llms.txt -- Comprehensive Shields.io badge suite synchronized across English and German READMEs: - * Python 3.10+ - * Version 1.1.3 - * MIT License - * PySide6 / Qt UI Engine - * Platform Windows / Linux / macOS - * 100% Offline / Zero-Egress Privacy - * Local-First Security - * i18n 6 Languages (DE, EN, ES, ZH, JA, RU) - * Pytest 106+ Tests (100% Green) - * Third-Party Audited (THIRD_PARTY_LICENSES.md) - * Marketing Log Active (MARKETING-LOG.txt) - * LLM-Ready (llms.txt) - * Ecosystem doc-bricks & Umbrella open-bricks - * Last Checked 2026-09-12 - -2. TARGET PERSONAS & VALUE PROPOSITIONS --------------------------------------------------------------------------------- -- Persona 1: Legal, Healthcare & Regulatory Compliance Officers - * Pain: Uploading sensitive patient files, litigation records, or tax receipts to cloud OCR services violates GDPR/HIPAA zero-egress data protection mandates. - * Solution: 100% local, air-gapped OCR processing where document bytes never leave the local system; non-destructive preserving of original evidence files. -- Persona 2: Archivists, Librarians & Academic Researchers - * Pain: Large collections of scanned historical manuscripts, multi-frame TIFF images, and multi-lingual books cannot be converted into searchable full-text archives without expensive per-page subscription fees. - * Solution: High-throughput batch conversion for PDF and image queues (JPG, PNG, multi-page TIFF), selectable language models with auto-download from official Tesseract sources, and automated multi-document PDF merge. -- Persona 3: Privacy-Conscious Knowledge Workers & Solo Business Owners - * Pain: Desktop tools like Adobe Acrobat or ABBYY FineReader require heavy annual subscriptions, cloud logins, intrusive background update daemons, or administrative elevation. - * Solution: Free, open-source MIT desktop tool with zero telemetry, unprivileged RunAsInvoker operation, portable single-executable or zero-install folder options, and keyboard-first accessibility. -- Persona 4: Automated Pipeline Integrators & Document Workflow Engineers - * Pain: GUI applications typically lack structured introspection, making it difficult to verify batch processing outcomes or integrate results with downstream automation. - * Solution: Structured job manifest export (pdftopdfocr-job-v1.json) capturing processing stats, timestamps, language tags, and page counts; CLI-ready invocation; machine-readable context via llms.txt. - -3. HIGH-INTENT KEYWORD MATRIX (EN / DE) --------------------------------------------------------------------------------- -- English Search Queries: - * "local pdf ocr converter windows", "offline searchable pdf creator", - * "tesseract ocr desktop gui pyside6", "batch ocr scanned documents free", - * "private pdf text recognition zero egress", "convert tiff to searchable pdf local", - * "portable pdf ocr tesseract without cloud", "gdpr compliant pdf ocr tool", - * "open source pdf ocr desktop alternative acrobat" -- Deutsche Suchbegriffe: - * "gescannte pdf durchsuchbar machen lokal", "offline pdf ocr texterkennung kostenlos", - * "stapelverarbeitung pdf ocr windows", "tesseract ocr deutsche benutzeroberfläche", - * "datenschutzkonforme ocr software ohne cloud", "tiff bilder in durchsuchbares pdf umwandeln", - * "portable ocr software ohne installation", "pdf ocr stapelverarbeitung pyside6", - * "kostenlose adobe acrobat ocr alternative datenschutz" - -4. 5-WAY COMPETITIVE MATRIX (10 DIMENSIONS) --------------------------------------------------------------------------------- -| Dimension | PDFtoPDFocr (doc-bricks) | Adobe Acrobat Pro | ABBYY FineReader PDF | OCRmyPDF (CLI) | Cloud OCR APIs (AWS/Google) | -|---|---|---|---|---|---| -| Zero-Egress Privacy | 100% Offline (Local) | Cloud sync default | Cloud options | 100% Offline (Local) | No (Cloud Upload) | -| Pricing / License | Free (MIT Permissive) | Subscription ($20+/mo) | Commercial ($100+) | Free (MPL-2.0) | Pay-per-page usage | -| Graphical User Interface | Accessible PySide6 GUI | Complex commercial UI | Heavy desktop UI | None (CLI only) | None (API only) | -| Keyboard Accessibility | Complete shortcuts/A11y | Standard | Standard | Terminal-based | N/A | -| Multi-Frame Image Support | Yes (TIFF, PNG, JPG) | Yes | Yes | Limited without scripts | API payloads | -| Automated Language DL | Yes (Official Tesseract)| Proprietary packages | Bundled | System package manager | Language auto-detect | -| Job Manifest Export | JSON (pdftopdfocr-job-v1)| Proprietary logs | Proprietary logs | Terminal stdout/exit | JSON response | -| Portable / Zero-Install | Yes (Portable folder/exe)| No (Heavy installer) | No (Heavy installer) | Requires brew/apt/docker| N/A | -| Non-Destructive Safety | Strict (_ocred.pdf) | Overwrites / prompts | Overwrites / prompts | In-place or new file | Creates new objects | -| Open-Source Transparency | Full MIT & Audited Deps | Closed source | Closed source | Open source (MPL) | Closed source APIs | - -5. SECURITY, ARCHITECTURE & RUNTIME INVARIANTS AUDIT --------------------------------------------------------------------------------- -- Verified and enforced 10 Governance & Runtime Invariants (INV-LOCAL-01 through INV-SLA-10) in THIRD_PARTY_LICENSES.md. -- Re-audited security policy in SECURITY.md with explicit 48-hour response SLA and 5-business-day triage commitment. -- Confirmed zero hardcoded user paths, zero plaintext tokens/secrets, and strict .gitignore conflict guards across all source and test files. - -6. ECOSYSTEM & SIBLING TOOLS INTEGRATION --------------------------------------------------------------------------------- -- Formally linked across doc-bricks document utilities (DokuReader, MediaBrain, UniversalDocsGrabber, UniversalInvoiceMail, UniversalMailCleaner, CleanMarkdown, LitZentrum, MailProcessor), file-bricks storage tools (ProFiler, ExplorerPro), dev-bricks tooling (DevCenter, CodeBox), and the open-bricks umbrella organization. - -7. HISTORICAL MILESTONES & RELEASE TRACKER --------------------------------------------------------------------------------- -- [2026-09-20] [v1.1.4] Pfad A Technical Hygiene, CI workflow timeout & concurrency hardening, stale automation, multi-host lock defense & test contract expansion. -- [2026-09-12] [v1.1.3] Pfad B Discoverability, Visual Architecture & License Governance audit; 16-point quick navigation; THIRD_PARTY_LICENSES.md; local MARKETING-LOG.txt; PEP 621 URLs. -- [2026-08-24] [v1.1.3] Internationalization expansion (DE, EN, ES, ZH, JA, RU); translations.json; language-switching regressions. -- [2026-08-21] [v1.1.2] Single-executable packaging gate; icon & desktop shortcut automation; build_release.py. -- [2026-07-28] [v1.1.0] Multi-format image import (multi-frame TIFF, PNG, JPG); auto-merge; portable job manifest export. -- [2026-07-22] [v1.0.0] Initial public release; core PySide6 GUI; Tesseract & Poppler local pipeline. - -8. TECHNICAL HYGIENE, CI MATRIX & MULTI-HOST HARDENING AUDIT (PFAD A) --------------------------------------------------------------------------------- -- CI-Workflow Timeout & Concurrency Hardening: - * .github/workflows/tests.yml: concurrency group cancel-in-progress, timeout-minutes: 15, permissions: contents: read. - * .github/workflows/source-platform-smoke.yml: concurrency group cancel-in-progress, timeout-minutes: 15, permissions: contents: read. -- Automated Issue & PR Lifecycle Automation: - * .github/workflows/stale.yml: actions/stale@v9, daily schedule 01:30 UTC, timeout-minutes: 10, least-privilege permissions (issues: write, pull-requests: write). -- Multi-Host Cloud-Sync & Canonical Lock-System Defense: - * .gitignore updated with comprehensive multi-host conflict patterns (* (kopie)*, * (copy)*, *conflicted copy*, *-WORKSTATION*, *-ASUS*, *-LAPTOP*, *-Mac Studio*). - * Lock-system protections (LOCK, LOCK.*, LOCK*.txt, LOCK.permissions.json, *.lock, uv.lock, !package-lock.json). -- PEP 621 Standard Manifest & Pytest Hygiene: - * pyproject.toml: license-files = ["LICENSE", "THIRD_PARTY_LICENSES.md"], version 1.1.4. - * pytest config: minversion = "7.0", norecursedirs aligned. -- Synchronized Release Parity across manifests, documentation, and test contracts (121/121 tests 100% green). diff --git a/manage_translations.py b/manage_translations.py index ce9d5f1..788e669 100644 --- a/manage_translations.py +++ b/manage_translations.py @@ -26,6 +26,21 @@ PLACEHOLDER_PATTERN = re.compile(r"\{([a-zA-Z0-9_]+)\}") +def _ensure_utf8_streams() -> None: + """Rekonfiguriert sys.stdout und sys.stderr defensiv auf UTF-8 fuer Windows CLI.""" + if sys.platform == "win32": + try: + if hasattr(sys.stdout, "reconfigure"): + sys.stdout.reconfigure(encoding="utf-8") + if hasattr(sys.stderr, "reconfigure"): + sys.stderr.reconfigure(encoding="utf-8") + except (AttributeError, OSError, ValueError): + pass + + +_ensure_utf8_streams() + + def load_translations(base_dir: Path) -> Dict[str, Dict[str, str]]: """Lädt translations.json.""" trans_path = base_dir / TRANSLATION_FILE @@ -95,8 +110,10 @@ def audit_translations(base_dir: Path) -> Tuple[bool, List[str], Dict[str, int]] def main() -> int: + _ensure_utf8_streams() + default_dir = str(Path(__file__).resolve().parent) parser = argparse.ArgumentParser(description="Multi-Language Translation Auditor für PDFtoPDFocr") - parser.add_argument("--dir", type=str, default=".", help="Projektverzeichnis (Default: .)") + parser.add_argument("--dir", type=str, default=default_dir, help=f"Projektverzeichnis (Default: {default_dir})") parser.add_argument("--check", action="store_true", help="Gibt Non-Zero Exit Code bei Fehlern zurück (CI-Gate)") args = parser.parse_args() diff --git a/tests/test_metadata.py b/tests/test_metadata.py index fa831d5..d23dafa 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -231,6 +231,10 @@ def test_gitignore_multihost_conflict_and_lock_defense() -> None: assert "uv.lock" in gitignore assert "!package-lock.json" in gitignore + # Internal log & processing file protection (T-20260926-455218633 / GITHUB-POLICY.md §4) + assert "MARKETING-LOG.txt" in gitignore + assert "*MARKETING-LOG.txt" in gitignore + # Test temp & cache protection assert ".pytest_temp/" in gitignore assert ".pytest_tmp*" in gitignore @@ -346,3 +350,10 @@ def test_pep621_seo_keywords_expansion() -> None: content = (ROOT / "pyproject.toml").read_text(encoding="utf-8") for keyword in ("batch-ocr", "accessibility", "local-first", "pdf", "ocr"): assert f'"{keyword}"' in content + + +def test_internal_marketing_log_not_tracked() -> None: + """Policy T-20260926-455218633: MARKETING-LOG.txt must never be tracked in git.""" + import subprocess + proc = subprocess.run(["git", "ls-files", "MARKETING-LOG.txt"], cwd=ROOT, capture_output=True, text=True) + assert proc.stdout.strip() == "", "MARKETING-LOG.txt must not be tracked in git"