docdiff 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +27 -49
- data/README.md +351 -0
- data/README_ja.md +351 -0
- data/Rakefile +2 -42
- data/bin/docdiff +53 -30
- data/{docdiff.conf.example → doc/example/docdiff.conf.example} +4 -3
- data/doc/man/docdiff.adoc +146 -0
- data/doc/news.md +180 -0
- data/doc/shell_completion/_docdiff.zsh +51 -0
- data/doc/shell_completion/docdiff.bash +68 -0
- data/docdiff.gemspec +1 -0
- data/lib/doc_diff.rb +13 -0
- data/lib/docdiff/version.rb +1 -1
- data/lib/docdiff/view.rb +4 -4
- data/test/charstring_test.rb +121 -121
- data/test/docdiff_test.rb +1 -1
- data/test/document_test.rb +109 -109
- data/test/fixture/01_ja_utf8_lf.txt +2 -0
- data/test/fixture/02_ja_utf8_lf.txt +2 -0
- data/test/view_test.rb +135 -111
- metadata +39 -36
- data/devutil/changelog.sh +0 -40
- data/index.html +0 -181
- data/langfilter.rb +0 -10
- data/readme.html +0 -750
- data/readme.md +0 -185
- /data/{docdiffwebui.cgi → doc/example/docdiffwebui.cgi} +0 -0
- /data/{docdiffwebui.html → doc/example/docdiffwebui.html} +0 -0
- /data/{img/docdiff-screenshot-format-html-digest-firefox.png → doc/img/screenshot-format-html-digest-firefox.png} +0 -0
- /data/{img/docdiff-screenshot-format-html-firefox.png → doc/img/screenshot-format-html-firefox.png} +0 -0
- /data/{img/docdiff-screenshot-format-tty-cmdexe-en.png → doc/img/screenshot-format-tty-cmdexe-en.png} +0 -0
- /data/{img/docdiff-screenshot-format-tty-cmdexe-ja.png → doc/img/screenshot-format-tty-cmdexe-ja.png} +0 -0
- /data/{img/docdiff-screenshot-format-tty-rxvtunicode-en.png → doc/img/screenshot-format-tty-rxvtunicode-en.png} +0 -0
- /data/{img/docdiff-screenshot-format-tty-rxvtunicode-ja.png → doc/img/screenshot-format-tty-rxvtunicode-ja.png} +0 -0
- /data/{img/docdiff-screenshot-format-tty-xterm-en.png → doc/img/screenshot-format-tty-xterm-en.png} +0 -0
- /data/{img/docdiff-screenshot-format-tty-xterm-ja.png → doc/img/screenshot-format-tty-xterm-ja.png} +0 -0
- /data/{img/docdiff-screenshot-resolution-linewordchar-xterm.png → doc/img/screenshot-resolution-linewordchar-xterm.png} +0 -0
- /data/{sample/01.en.ascii.cr → test/fixture/01_en_ascii_cr.txt} +0 -0
- /data/{sample/01.en.ascii.crlf → test/fixture/01_en_ascii_crlf.txt} +0 -0
- /data/{sample/01.en.ascii.lf → test/fixture/01_en_ascii_lf.txt} +0 -0
- /data/{sample/01.ja.eucjp.lf → test/fixture/01_ja_eucjp_lf.txt} +0 -0
- /data/{sample/01.ja.sjis.cr → test/fixture/01_ja_sjis_cr.txt} +0 -0
- /data/{sample/01.ja.sjis.crlf → test/fixture/01_ja_sjis_crlf.txt} +0 -0
- /data/{sample/01.ja.utf8.crlf → test/fixture/01_ja_utf8_crlf.txt} +0 -0
- /data/{sample/02.en.ascii.cr → test/fixture/02_en_ascii_cr.txt} +0 -0
- /data/{sample/02.en.ascii.crlf → test/fixture/02_en_ascii_crlf.txt} +0 -0
- /data/{sample/02.en.ascii.lf → test/fixture/02_en_ascii_lf.txt} +0 -0
- /data/{sample/02.ja.eucjp.lf → test/fixture/02_ja_eucjp_lf.txt} +0 -0
- /data/{sample/02.ja.sjis.cr → test/fixture/02_ja_sjis_cr.txt} +0 -0
- /data/{sample/02.ja.sjis.crlf → test/fixture/02_ja_sjis_crlf.txt} +0 -0
- /data/{sample/02.ja.utf8.crlf → test/fixture/02_ja_utf8_crlf.txt} +0 -0
- /data/{sample/humpty_dumpty01.ascii.lf → test/fixture/humpty_dumpty01_ascii_lf.txt} +0 -0
- /data/{sample/humpty_dumpty02.ascii.lf → test/fixture/humpty_dumpty02_ascii_lf.txt} +0 -0
data/readme.md
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
# DocDiff
|
|
2
|
-
|
|
3
|
-
(C) 2000 Hisashi MORITA
|
|
4
|
-
|
|
5
|
-
## Todo
|
|
6
|
-
|
|
7
|
-
* Incorporate ignore space patch.
|
|
8
|
-
* Better auto-recognition of encodings and eols.
|
|
9
|
-
* Make CSS and tty escape sequence customizable in config files.
|
|
10
|
-
* Better multilingualization using Ruby 1.9 feature.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Description
|
|
14
|
-
|
|
15
|
-
Compares two text files by word, by character, or by line
|
|
16
|
-
|
|
17
|
-
## Summary
|
|
18
|
-
|
|
19
|
-
DocDiff compares two text files and shows the difference. It can compare files word by word, character by character, or line by line. It has several output formats such as HTML, tty, Manued, or user-defined markup.
|
|
20
|
-
|
|
21
|
-
It supports several encodings and end-of-line characters, including ASCII (and other single byte encodings such as ISO-8859-*), UTF-8, EUC-JP, Shift_JIS, CR, LF, and CRLF.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Requirement
|
|
25
|
-
|
|
26
|
-
* Ruby (http://www.ruby-lang.org)
|
|
27
|
-
(Note that you may need additional ruby library such as iconv, if your OS's Ruby package does not include those.)
|
|
28
|
-
|
|
29
|
-
## Installation
|
|
30
|
-
|
|
31
|
-
Note that you need appropriate permission for proper installation (you may have to have a root/administrator privilege).
|
|
32
|
-
|
|
33
|
-
* Place `docdiff/` directory and its contents to ruby library directory, so that ruby interpreter can load them.
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
# cp -r docdiff /usr/lib/ruby/1.9.1
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
* Place `docdiff.rb` in command binary directory.
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
# cp docdiff.rb /usr/bin/
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
* (Optional) You may want to rename it to `docdiff`.
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
# mv /usr/bin/docdiff.rb /usr/bin/docdiff
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
* (Optional) When invoked as `chardiff` or `worddiff`, docdiff runs with resolution set to `char` or `word`, respectively.
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
# ln -s /usr/bin/docdiff.rb /usr/bin/chardiff.rb
|
|
55
|
-
# ln -s /usr/bin/docdiff.rb /usr/bin/worddiff.rb
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
* Set appropriate permission.
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
# chmod +x /usr/bin/docdiff.rb
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
* (Optional) If you want site-wide configuration file, place `docdiff.conf.example` as `/etc/docdiff/docdiff.conf` and edit it.
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
# cp docdiff.conf.example /etc/docdiff.conf
|
|
68
|
-
# $EDITOR /etc/docdiff.conf
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
* (Optional) If you want per-user configuration file, place `docdiff.conf.example` as `~/etc/docdiff/docdiff.conf` and edit it.
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
% cp docdiff.conf.example ~/etc/docdiff.conf
|
|
75
|
-
% $EDITOR ~/etc/docdiff.conf
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Usage
|
|
79
|
-
|
|
80
|
-
### Synopsis
|
|
81
|
-
|
|
82
|
-
% docdiff [options] oldfile newfile
|
|
83
|
-
|
|
84
|
-
e.g.
|
|
85
|
-
|
|
86
|
-
% docdiff old.txt new.txt > diff.html
|
|
87
|
-
|
|
88
|
-
See the help message for detail (`docdiff --help`).
|
|
89
|
-
|
|
90
|
-
## License
|
|
91
|
-
|
|
92
|
-
This software is distributed under so-called modified BSD style license (http://www.opensource.org/licenses/bsd-license.php (without advertisement clause)). By contributing to this software, you agree that your contribution may be incorporated under the same license.
|
|
93
|
-
|
|
94
|
-
Copyright and condition of use of main portion of the source:
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
Copyright (C) Hisashi MORITA. All rights reserved.
|
|
98
|
-
|
|
99
|
-
Redistribution and use in source and binary forms, with or without
|
|
100
|
-
modification, are permitted provided that the following conditions
|
|
101
|
-
are met:
|
|
102
|
-
1. Redistributions of source code must retain the above copyright
|
|
103
|
-
notice, this list of conditions and the following disclaimer.
|
|
104
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
105
|
-
notice, this list of conditions and the following disclaimer in the
|
|
106
|
-
documentation and/or other materials provided with the distribution.
|
|
107
|
-
3. Neither the name of the University nor the names of its contributors
|
|
108
|
-
may be used to endorse or promote products derived from this software
|
|
109
|
-
without specific prior written permission.
|
|
110
|
-
|
|
111
|
-
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
112
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
113
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
114
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
115
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
116
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
117
|
-
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
118
|
-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
119
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
120
|
-
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
121
|
-
SUCH DAMAGE.
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
diff library (`docdiff/diff.rb` and `docdiff/diff/*`) was originally a part of Ruby/CVS by Akira TANAKA.
|
|
125
|
-
Ruby/CVS is licensed under modified BSD style license.
|
|
126
|
-
See the following for detail.
|
|
127
|
-
|
|
128
|
-
* http://raa.ruby-lang.org/list.rhtml?name=ruby-cvs
|
|
129
|
-
* http://cvs.m17n.org/~akr/ruby-cvs/
|
|
130
|
-
|
|
131
|
-
## Credits
|
|
132
|
-
|
|
133
|
-
* Hisashi MORITA (primary author)
|
|
134
|
-
|
|
135
|
-
## Acknowledgments
|
|
136
|
-
|
|
137
|
-
* Akira TANAKA (diff library author)
|
|
138
|
-
* Shin'ichiro HARA (initial idea and algorithm suggestion)
|
|
139
|
-
* Masatoshi SEKI (patch)
|
|
140
|
-
* Akira YAMADA (patch, Debian package)
|
|
141
|
-
* Kenshi MUTO (testing, bug report, Debian package)
|
|
142
|
-
* Kazuhiro NISHIYAMA (bug report)
|
|
143
|
-
* Hiroshi OHKUBO (bug report)
|
|
144
|
-
* Shugo MAEDA (bug report)
|
|
145
|
-
* Kazuhiko (patch)
|
|
146
|
-
* Shintaro Kakutani (patches)
|
|
147
|
-
* Masayoshi Takahashi (patches)
|
|
148
|
-
* Masakazu Takahashi (patch)
|
|
149
|
-
* Hibariya (bug report)
|
|
150
|
-
* Hiroshi SHIBATA (patch)
|
|
151
|
-
* Tamotsu Takahashi (patches)
|
|
152
|
-
* MIKAMI Yoshiyuki (patch)
|
|
153
|
-
|
|
154
|
-
Excuse us this list is far from complete and fails to acknowledge many
|
|
155
|
-
more who have helped us somehow. We really appreciate it.
|
|
156
|
-
|
|
157
|
-
## Resources
|
|
158
|
-
|
|
159
|
-
### Format
|
|
160
|
-
|
|
161
|
-
* HTML/XHTML http://www.w3.org
|
|
162
|
-
* tty (Graphic rendition using VT100 / ANSI escape sequence)
|
|
163
|
-
* VT100: http://vt100.net/docs/tp83/appendixb.html
|
|
164
|
-
* ANSI: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
|
|
165
|
-
* Manued (Manuscript Editing language: a proofreading method for text)
|
|
166
|
-
* http://www.archi.is.tohoku.ac.jp/~yamauchi/otherprojects/manued/index.shtml
|
|
167
|
-
|
|
168
|
-
### Similar Software
|
|
169
|
-
|
|
170
|
-
There are several other software that can compare text word by word and/or character by character.
|
|
171
|
-
|
|
172
|
-
* GNU wdiff (Seems to support single byte characters only.)
|
|
173
|
-
http://www.gnu.org/directory/GNU/wdiff.html
|
|
174
|
-
* cdif by Kazumasa UTASHIRO (Supports several Japanese encodings.)
|
|
175
|
-
http://srekcah.org/~utashiro/perl/scripts/cdif
|
|
176
|
-
* ediff for Emacsen
|
|
177
|
-
http://www.xemacs.org/Documentation/packages/html/ediff.html
|
|
178
|
-
* diff-detail for xyzzy, by Hiroshi OHKUBO
|
|
179
|
-
http://ohkubo.s53.xrea.com/xyzzy/index.html#diff-detail
|
|
180
|
-
* Manuediff (Outputs difference in Manued format.)
|
|
181
|
-
http://hibiki.miyagi-ct.ac.jp/~suzuki/comp/export/manuediff.html
|
|
182
|
-
* YASDiff (Yet Another Scheme powered diff) by Y. Fujisawa
|
|
183
|
-
http://nnri.dip.jp/~yf/cgi-bin/yaswiki2.cgi?name=YASDiff&parentid=0
|
|
184
|
-
* WinMerge (GUI diff tool for Windows)
|
|
185
|
-
http://winmerge.org/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/{img/docdiff-screenshot-format-html-firefox.png → doc/img/screenshot-format-html-firefox.png}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/{img/docdiff-screenshot-format-tty-xterm-en.png → doc/img/screenshot-format-tty-xterm-en.png}
RENAMED
|
File without changes
|
/data/{img/docdiff-screenshot-format-tty-xterm-ja.png → doc/img/screenshot-format-tty-xterm-ja.png}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|