Text diff tools: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
Line 2: Line 2:


== Free tools ==
== Free tools ==
* [http://winmerge.org/ WinMerge] 2.12.4 ([http://portableapps.com/apps/utilities/winmerge_portable portable version])
[http://winmerge.org/ WinMerge] 2.12.4 ([http://portableapps.com/apps/utilities/winmerge_portable portable version])
** 介面: <abbr title="圖形化的使用者介面, Graphical user interface">GUI</abbr>, GNU software
* 介面: <abbr title="圖形化的使用者介面, Graphical user interface">GUI</abbr>, GNU software
** 輸出: 可輸出比較的檔案(補綴檔案、HTML檔案)
* 輸出: 可輸出比較的檔案(補綴檔案、HTML檔案)
** 比較檔案
* 比較檔案
*** 比較萬國碼的檔案(unicode support): 可
** 比較萬國碼的檔案(unicode support): 可
*** 標示行內差異的行內文字: 可 [[Image:Icon exclaim.gif| ]] 但是會一大片文字通通標示為差異,不像UltraCompare比較的範圍比較小而精準。
** 標示行內差異的行內文字: 可 [[Image:Icon exclaim.gif| ]] 但是會一大片文字通通標示為差異,不像UltraCompare比較的範圍比較小而精準。
*** 可比較Office檔案 教學: [http://libraryviews.blogsome.com/2010/01/13/915/ Library Views 圖書館觀點 &raquo; 如何比對 Excel 或 Word檔]
** 可比較Office檔案 教學: [http://libraryviews.blogsome.com/2010/01/13/915/ Library Views 圖書館觀點 &raquo; 如何比對 Excel 或 Word檔]
*** 如果同一檔案,但是不同「行尾字元」(Windows: CRLF, Unix: LF, Mac: CR),則整個檔案視為不同,需要手動轉換。 [[Image:Icon exclaim.gif| ]] (選單: 檔案 --> 轉換行尾字元成... )
** 如果同一檔案,但是不同「行尾字元」(Windows: CRLF, Unix: LF, Mac: CR),則整個檔案視為不同,需要手動轉換。 [[Image:Icon exclaim.gif| ]] (選單: 檔案 --> 轉換行尾字元成... )
*** 忽略以 [[Comment Syntax]] 為起首的該行的內文的差異: 可。 [http://manual.winmerge.org/Filters.html Using Filters - WinMerge 2.12 Manual]
** 忽略以 [[Comment Syntax]] 為起首的該行的內文的差異: 可。 [http://manual.winmerge.org/Filters.html Using Filters - WinMerge 2.12 Manual]
** 比較資料夾: 可
* 比較資料夾: 可




* [http://www.grigsoft.com/wincmp3.htm Compare It! ] v.4
[http://www.grigsoft.com/wincmp3.htm Compare It! ] v.4
** 介面: <abbr title="圖形化的使用者介面, Graphical user interface">GUI</abbr>, freeware
* 介面: <abbr title="圖形化的使用者介面, Graphical user interface">GUI</abbr>, freeware
** 輸出: 可輸出比較檔案,格式有html、unix diff等 (Menu: File -> Report: Generate comparison report)
* 輸出: 可輸出比較檔案,格式有html、unix diff等 (Menu: File -> Report: Generate comparison report)
** 比較萬國碼的檔案(unicode support): 可  
* 比較萬國碼的檔案(unicode support): 可  
** 比較資料夾: 可,輸出左右欄內文比較的網頁檔 (實際測試有檔案漏掉)
* 比較資料夾: 可,輸出左右欄內文比較的網頁檔 (實際測試有檔案漏掉)


* [http://gnuwin32.sourceforge.net/packages/diffutils.htm DiffUtils for Windows] 2.8.7
[http://gnuwin32.sourceforge.net/packages/diffutils.htm DiffUtils for Windows] 2.8.7
** 介面: command-line software, GNU software  
* 介面: command-line software, GNU software  
** cmd> diff -durN 原始的檔名 更改後的檔名 > diff.txt
* cmd> diff -durN 原始的檔名 更改後的檔名 > diff.txt


* [http://www.softinterface.com/MD/MD.htm Diff Doc] 3.27 - A compare files Tool. Compare document, Compare XLS-Text-RTF and other file types.
[http://www.softinterface.com/MD/MD.htm Diff Doc] 3.27 - A compare files Tool. Compare document, Compare XLS-Text-RTF and other file types.
: 介面: GUI, freeware
* 介面: GUI, freeware
: comment: 自作主張將movabletype的template轉成html,比較不出差異。安裝時不要選擇Traditional chinese,會造成介面亂碼
* comment: 自作主張將movabletype的template轉成html,比較不出差異。安裝時不要選擇Traditional chinese,會造成介面亂碼


* [http://www.prestosoft.com/ps.asp?page=edp_examdiff ExamDiff](TM) Version 1.8
[http://www.prestosoft.com/ps.asp?page=edp_examdiff ExamDiff](TM) Version 1.8
** 介面: GUI, freeware
* 介面: GUI, freeware
** unicode support: ExamDiff Freeware版本不支援 (Pro版本''$''有支援)
* unicode support: ExamDiff Freeware版本不支援 (Pro版本''$''有支援)
** comment: 輸出的比較檔案與DiffUtils相同僅有UNIX Diff File,但是缺乏DiffUtils選項設定,導致不易懂
* comment: 輸出的比較檔案與DiffUtils相同僅有UNIX Diff File,但是缺乏DiffUtils選項設定,導致不易懂


* [http://filezilla-project.org/ FileZilla] v.3.5.2
[http://filezilla-project.org/ FileZilla] v.3.5.2
** 介面: GUI, freeware
* 介面: GUI, freeware
** 輸出: 否
* 輸出: 否
** 比較檔案: 否
* 比較檔案: 否
** 比較資料夾: 可。[[Image:Icon exclaim.gif| ]] (1)僅比對資料夾的檔案日期 或 檔案大小 擇一。如果檔案內容相同,但檔案名稱不同,視為不同。 (2)如果子資料夾有不同檔案,不會在子資料夾標示上顏色。
* 比較資料夾: 可。[[Image:Icon exclaim.gif| ]] (1)僅比對資料夾的檔案日期 或 檔案大小 擇一。如果檔案內容相同,但檔案名稱不同,視為不同。 (2)如果子資料夾有不同檔案,不會在子資料夾標示上顏色。


* [http://meld.sourceforge.net/ Meld Diff Viewer] for *unix like OS
[http://meld.sourceforge.net/ Meld Diff Viewer] for *unix like OS
** 介面: GUI, freeware
* 介面: GUI, freeware
** 輸出: ?
* 輸出: ?
** unicode support: ?
* unicode support: ?




* [http://notepad-plus-plus.org/ Notepad++] v.6.1.5 + [http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central Compare plugin][http://sourceforge.net/projects/npp-plugins/]<ref>[http://www.davidtan.org/how-to-compare-two-text-files-using-notepad-plus/ How To Compare Two Text Files Using Notepad++] </ref>
[http://notepad-plus-plus.org/ Notepad++] v.6.1.5 + [http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central Compare plugin][http://sourceforge.net/projects/npp-plugins/]<ref>[http://www.davidtan.org/how-to-compare-two-text-files-using-notepad-plus/ How To Compare Two Text Files Using Notepad++] </ref>
** 介面: GUI, freeware
* 介面: GUI, freeware
** 輸出: '''不可'''輸出比較檔案
* 輸出: '''不可'''輸出比較檔案
** unicode support: 可
* unicode support: 可


* [http://www.angusj.com/delphi/textdiff.html TextDiff] 4.2
[http://www.angusj.com/delphi/textdiff.html TextDiff] 4.2
: GUI, freeware & greenware
* GUI, freeware & greenware
: 顏色標記差異處, 可輸出比較檔案(純文字檔, 不支援Unicode), 中文介紹: [http://blog.joaoko.net/archives/295 免費免安裝的文字比較工具 - TextDiff | joaoko’s blog]
* 顏色標記差異處, 可輸出比較檔案(純文字檔, 不支援Unicode), 中文介紹: [http://blog.joaoko.net/archives/295 免費免安裝的文字比較工具 - TextDiff | joaoko’s blog]


* [http://www.comparemyfiles.com/default.aspx Free Online File Compare Utility] (access: 20090127)
[http://kdiff3.sourceforge.net/ KDiff3] 0.9.97 (2012-08-12)
: 介面: GUI 線上免費服務
* 介面: GUI
: 顏色標記差異處, '''不可'''輸出比較檔案, 中文介紹: [http://iwanthotnews.blogspot.com/2009/01/comparemyfilescom.html CompareMyFiles.com 線上檔案比對工具-哈燒部落 I Want Hot News]
* 輸出: 顏色標記差異處。可輸出比較檔案(選單: File -> Print)
: 中文UTF-8編碼的純文字檔ok, xml檔則變成亂碼
* 比較檔案: 可比較萬國碼的檔案。 {{exclaim}} 中文與數字夾雜時,數字位置有跑掉
* 比較資料夾: 可
 
[http://www.comparemyfiles.com/default.aspx Free Online File Compare Utility] (access: 20090127)
* 介面: GUI 線上免費服務
* 顏色標記差異處, '''不可'''輸出比較檔案, 中文介紹: [http://iwanthotnews.blogspot.com/2009/01/comparemyfilescom.html CompareMyFiles.com 線上檔案比對工具-哈燒部落 I Want Hot News]
* 中文UTF-8編碼的純文字檔ok, xml檔則變成亂碼


== Shareware ==
== Shareware ==

Revision as of 09:33, 30 April 2013

the tools for comparing files by content - 用來(1)比對文字檔(如程式碼) 或 (2)資料夾內檔案 的差異

Free tools

WinMerge 2.12.4 (portable version)

  • 介面: GUI, GNU software
  • 輸出: 可輸出比較的檔案(補綴檔案、HTML檔案)
  • 比較檔案
    • 比較萬國碼的檔案(unicode support): 可
    • 標示行內差異的行內文字: 可 Icon exclaim.gif 但是會一大片文字通通標示為差異,不像UltraCompare比較的範圍比較小而精準。
    • 可比較Office檔案 教學: Library Views 圖書館觀點 » 如何比對 Excel 或 Word檔
    • 如果同一檔案,但是不同「行尾字元」(Windows: CRLF, Unix: LF, Mac: CR),則整個檔案視為不同,需要手動轉換。 Icon exclaim.gif (選單: 檔案 --> 轉換行尾字元成... )
    • 忽略以 Comment Syntax 為起首的該行的內文的差異: 可。 Using Filters - WinMerge 2.12 Manual
  • 比較資料夾: 可


Compare It! v.4

  • 介面: GUI, freeware
  • 輸出: 可輸出比較檔案,格式有html、unix diff等 (Menu: File -> Report: Generate comparison report)
  • 比較萬國碼的檔案(unicode support): 可
  • 比較資料夾: 可,輸出左右欄內文比較的網頁檔 (實際測試有檔案漏掉)

DiffUtils for Windows 2.8.7

  • 介面: command-line software, GNU software
  • cmd> diff -durN 原始的檔名 更改後的檔名 > diff.txt

Diff Doc 3.27 - A compare files Tool. Compare document, Compare XLS-Text-RTF and other file types.

  • 介面: GUI, freeware
  • comment: 自作主張將movabletype的template轉成html,比較不出差異。安裝時不要選擇Traditional chinese,會造成介面亂碼

ExamDiff(TM) Version 1.8

  • 介面: GUI, freeware
  • unicode support: ExamDiff Freeware版本不支援 (Pro版本$有支援)
  • comment: 輸出的比較檔案與DiffUtils相同僅有UNIX Diff File,但是缺乏DiffUtils選項設定,導致不易懂

FileZilla v.3.5.2

  • 介面: GUI, freeware
  • 輸出: 否
  • 比較檔案: 否
  • 比較資料夾: 可。Icon exclaim.gif (1)僅比對資料夾的檔案日期 或 檔案大小 擇一。如果檔案內容相同,但檔案名稱不同,視為不同。 (2)如果子資料夾有不同檔案,不會在子資料夾標示上顏色。

Meld Diff Viewer for *unix like OS

  • 介面: GUI, freeware
  • 輸出: ?
  • unicode support: ?


Notepad++ v.6.1.5 + Compare plugin[1][1]

  • 介面: GUI, freeware
  • 輸出: 不可輸出比較檔案
  • unicode support: 可

TextDiff 4.2

KDiff3 0.9.97 (2012-08-12)

  • 介面: GUI
  • 輸出: 顏色標記差異處。可輸出比較檔案(選單: File -> Print)
  • 比較檔案: 可比較萬國碼的檔案。 Icon_exclaim.gif 中文與數字夾雜時,數字位置有跑掉
  • 比較資料夾: 可

Free Online File Compare Utility (access: 20090127)

Shareware


  • Total Commander 7.56a
    • 介面: GUI
    • 輸出: 顏色標記差異處, 不可輸出比較檔案
    • 比較檔案(選單列: Files -->Compare by content)
      • 比較萬國碼的檔案(unicode support): Unicode檔案變成亂碼 Icon_exclaim.gif
      • 標示行內差異的行內文字: 否
    • 比較資料夾: 可 (選單列: Commands --> Synchronize Dirs 再點選Compare, 建議勾選by content)


  • UltraCompare v.8
    • 介面: GUI, shareware
    • 輸出: 顏色標記差異處, 不可輸出比較檔案
    • 比較檔案
      • 比較萬國碼的檔案(unicode support): 可
      • 標示行內差異的行內文字: 可 Good.gif
    • 比較資料夾: 可
  • Compare++ - Structured file compare and merge tool v.1.7.2.x
    • 介面: GUI
    • 輸出: 可輸出比較檔案 (選單列: File --> Report)
    • 比較檔案
      • 比較萬國碼的檔案(unicode support): 可
      • 標示行內差異的行內文字: 可 Good.gif
    • 比較資料夾: 可

Other shareware: Araxis Merge, FileDiff, ExamDiff Pro

Dropbox + diff tools

Icon_exclaim.gif Dropbox 需要切換成英文介面(在 Dropbox 客戶端軟體設定),中文介面會導致 DropboxDiff 遇到檔案亂碼問題 (2013-04-29)

Supported diff tools quoted from official

"%ProgramFiles%\TortoiseSVN\bin\TortoiseMerge.exe"
"%ProgramFiles%\KDiff3\kdiff3.exe"
bash -c '"$HOME/bin/tkdiff" $1 $2'

---------
tested:
---------
"%ProgramFiles%\Beyond Compare 3\BCompare.exe"

more on


related terms

  • diff tools

編輯器設定

為了方便 diff ,使用 4 個 space 取代 Tab 按鍵[2]

ex: Sublime Text v.2[3] Menu -> Preferences -> Settings - User

{
    "tab_size": 4,
    "translate_tabs_to_spaces": true
}

references

  1. How To Compare Two Text Files Using Notepad++
  2. Indentation Settings - Sublime Text 2 Documentation