Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Conversation

@GhostWr1t3r
Copy link

@GhostWr1t3r GhostWr1t3r commented Jul 30, 2025

Description

Adds an optional Rich-powered terminal UI for parsed content, improving readability in CLI environments while maintaining backward compatibility.

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit tests: Verified UI wrapper preserves original content

    def test_ui_does_not_alter_content():
        raw, _ = parser.parse("test.pdf")
        ui, _ = parser.parse("test.pdf", show_ui=True)
        assert raw == ui  # Content integrity check
  • Performance benchmarks:

    Mode Avg Time (10 runs)
    Default 3.70s
    UI Enabled 4.71s ±1.01s
  • Manual verification:
    Tested with PDF/DOCX/HTML inputs

Screenshots

Before:
Raw output

After:
Formatted UI

Checklist

  • Code follows project style guidelines
  • Self-review performed
  • Comments added for complex logic
  • Documentation updated (README.md)
  • No new warnings generated
  • Tests added (content integrity + performance)
  • All tests pass locally

Additional Notes

  • Zero dependency impact: Uses rich
  • Opt-in design: No behavior changes unless show_ui=True
  • Extensible: Theme configurations can be added later

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant