Skip to content
/ docdiff Public

Compare two text documents, and show differences in browser or terminal

License

Notifications You must be signed in to change notification settings

xlucn/docdiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

文档对比工具

自动对比两份纯文本文档,以不同颜色高亮形式输出。

增删部分分两行显示,无变化部分仅显示一行原文。

Demo: https://xlu.pythonanywhere.com/docdiff.html

使用方法

作为flask应用

gunicorn docdiff:app

或者

python docdiff.py -r

终端运行

注意:终端需支持标准的颜色转义字符串(如尝试执行printf "\e[31mRed\e[0m\n"

usage: docdiff.py [-h] [-f FILE FILE] [-l] [-r]

options:
  -h, --help            show this help message and exit
  -f FILE FILE, --file FILE FILE
                        Input files
  -l, --line            Fast line-by-line comparison
  -r, --run-flask       Run built-in flask app in terminal

About

Compare two text documents, and show differences in browser or terminal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published