Skip to content

A terminal-based UI to show the difference between two file.

Notifications You must be signed in to change notification settings

BRainynight/TwoColumnsTextViewer

Repository files navigation

Description

A simple text viewer for viewing differences between 2 files.

Requirement

  • Python 3.8

Usage

  • Use keyboard or vim-style arrow keys to control cursor up and down.
  • Refresh comparison by key r
python main.py <fromfile> <tofile>	 	# compare 2 file based on fromfile 
python main.py -r <fromfile> <tofile>	# compare 2 file based on tofile.

Screenshot

Example

Update Logs

  • 2022/11/10:
    • Handle keyboard interrupt exception and resize event.
    • Keep tab spacing in viewer.
    • Press r can refresh comparison.
  • 2022/11/03:
    • Enable vim-style arrow keys (k, j, h, l). For my VS code terminal (PowerShell) , the keyboard arrow keys is unable because its return value of getkey() is differ from the official key list.
    • Add file name in the top of viewer.
    • Add the line number range for each block.
    • Add the argument reverse in CLI.

Reference

About

A terminal-based UI to show the difference between two file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages