Skip to content

Repository files navigation

⚡ Local Text Compare & Document Suite

Live Demo Interactive Showcase


License: MIT Offline: 100% Dependencies: Zero Compliance: HIPAA%20%2F%20GDPR Platform: Web%20%2F%20Desktop

100% Offline, Air-Gapped Text, Code, Word (.docx), PowerPoint (.pptx), and PDF Diff & Merge Suite with Interactive Automated Showcase.

Developed by Jayanth (@JayAnthKolli46) with the assistance of Google Antigravity.

🌐 Open Live Tool✨ Interactive Auto-Demo📖 Features⌨️ Shortcuts🔒 Security


🌟 Why Local Text Compare?

Most online text comparison tools send your proprietary source code, confidential agreements, API tokens, and corporate logs to remote servers for processing.

Local Text Compare & Document Suite executes 100% in your browser's local RAM using native Web APIs (DecompressionStream, DOMParser, TreeWalker). It never makes a single network request, stores cookies, or triggers telemetry.


📦 Repository Structure

local-text-compare/
├── index.html               # ⚡ Production Diff & Merge Workstation (Ultra-fast, zero-overhead)
├── demo.html                # 🎬 Standalone 22-Chapter Interactive Guided Showcase Edition
├── Launch-DiffTool.ps1      # 🚀 1-Click Windows launcher for index.html
├── Launch-Demo.ps1          # ✨ 1-Click Windows launcher for demo.html
├── LICENSE                  # 📄 MIT Open Source License
├── SECURITY.md              # 🔒 Air-Gapped Compliance & Privacy Policy
├── CONTRIBUTING.md          # 🤝 Contributor Guidelines
├── llms.txt                 # 🤖 AI Agent & LLM Semantic Discovery Standard
├── sitemap.xml              # 🗺️ SEO Sitemap for search crawlers
├── robots.txt               # 🤖 Crawler directives
├── manifest.json            # 📱 Web App / PWA metadata
└── README.md                # 📖 Documentation & User Guide

✨ Key Features

1. Unified 7-Column Split Diff Engine

  • Synchronized Row Heights: Eliminates the classic word-wrap vertical drift found in traditional diff engines. Left and Right cells share locked table rows.
  • Visual Color Highlights: Soft green for additions (+), red for deletions (-), and yellow for intra-line modifications (~).

2. Word (.docx), PowerPoint (.pptx) & PDF Decompression

  • Native In-Memory Parsing: Uses browser DecompressionStream('deflate-raw') to extract text and styling directly from OpenXML .docx/.pptx and binary compressed PDF FlateDecode streams.
  • Encoding Auto-Detection: Automatically detects Windows UTF-16LE, UTF-16BE, and UTF-8 BOM files without generating \0 null-byte artifacts.

3. "Edit texts..." 9-Function Transformation Suite

  • Casing: To lowercase, To UPPERCASE, Title Case / Capitalize Words.
  • Sorting: Natural alphanumeric line sorting (A to Z and Z to A).
  • Cleaning: Unwrap paragraph line breaks into single lines, collapse excess whitespace, purge empty/blank lines symmetrically, and remove duplicate lines.
  • Scoping: Apply to Both Panes, Left Only, or Right Only in 1 click.

4. Code & Structured Data Prettifiers

  • CSV / TSV Column Aligner: Auto-measures max column widths and pads comma/tab-separated values into clean tabular grids.
  • Fault-Tolerant JSONC: Tolerates single-line // comments and trailing commas without syntax errors; formats with 2 spaces or sorted keys.
  • Safe SQL Prettifier: Formats SQL keywords into uppercase multi-line queries while protecting string literals.
  • XML / HTML Formatter: Indents and cleans markup trees cleanly.

5. Granular Diffing & Regex Filtering

  • Word vs Character Level: Switch to Character Level to isolate single-letter typos (e.g. subcription vs subscription isolates s).
  • Regex Ignore Pattern: Provide patterns like \/\/.+ (strip comments) or \d{4}-\d{2}-\d{2} (strip timestamps) before diffing.
  • Filters: Toggle Ignore Case (A == a), Ignore Trim, Ignore Spaces, and Blank Lines normalization.

6. Atomic In-Place & Chunk Merging

  • Single-Line Gutter Arrows: Click or to merge individual lines.
  • Atomic Multi-Line Chunk Merging (Alt + →): Splices entire multi-line block insertions atomically into array and DOM nodes without index drift.

7. DOM-Safe TreeWalker Search (Ctrl + F)

  • Searches within diff rows using pure DOM TreeWalker text node traversal, preventing <mark> highlights from corrupting underlying diff <span> tags.

8. Export Suite

  • Git Patch (.diff): Generates standard unified diff files with @@ -L,S +L,S @@ hunk headers.
  • Self-Contained HTML Reports: Adaptive dark/light styled single-file HTML reports ready for sharing.

🎬 22-Chapter Interactive Guided Showcase (demo.html)

Double-click Launch-Demo.ps1 or open demo.html to experience an automated, self-running feature walkthrough:

  • Glowing Spotlight Overlay: Dims the screen and illuminates the active UI component.
  • Simulated Animated Cursor: Glides to buttons and generates click ripples.
  • Live Data Injections: Dynamically loads before/after scenarios (e.g. casing differences, uneven indentation, or rich formulas) so diff calculations are visible live.
  • Interactive Controls: Play/Pause (Spacebar), Speed selector (0.5x to 2.0x), Chapter selector dropdown, and a Minimizable HUD (_).

⌨️ Keyboard Shortcuts

Shortcut Action
Alt + S Switch Left and Right documents
Alt + N / F7 Jump to Next Difference
Alt + P / Shift + F7 Jump to Previous Difference
Alt + → Merge active diff chunk to Right
Alt + ← Merge active diff chunk to Left
Alt + V Toggle Split vs Unified View
Ctrl + F Search inside Diff
Ctrl + B / I / U Bold, Italic, Underline (in Rich Edit Mode)
Spacebar Play / Pause interactive demo tour (in demo.html)
? Open Help dialog
Esc Close search, modal, or exit demo

🚀 Quick Start & Usage

🌐 Use Online (Zero Setup)

Access the live, private web application in any browser:
👉 https://jayanthkolli46.github.io/local-text-compare/

💻 Run Offline (Air-Gapped Workstations)

  1. Clone or download this repository:
    git clone https://github.com/JayAnthKolli46/local-text-compare.git
  2. Double-click Launch-DiffTool.ps1 (Windows) or open index.html directly in any web browser.
  3. For the self-running automated feature showcase, open demo.html or double-click Launch-Demo.ps1.

🔒 Air-Gapped Security Guarantee

  • Zero External Network Calls: No CDNs, external web fonts, tracking cookies, or remote server endpoints.
  • In-Memory Execution: All files are parsed in browser RAM. No data is stored or transmitted.
  • Enterprise Ready: Compliant with HIPAA, GDPR, SOC 2, and strict corporate air-gapped workstations.

📄 License

Distributed under the MIT License. See LICENSE for details.

Created with ❤️ by Jayanth (@JayAnthKolli46) with the assistance of Google Antigravity.

About

⚡ 100% Offline, Air-Gapped Text, Code, Word (.docx), PowerPoint (.pptx), and PDF Diff & Merge Suite with Interactive Guided Showcase. Zero server calls, runs in browser RAM.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages