Skip to content

Commit ecfd0b1

Browse files
authored
Merge pull request #7 from pyropy/dev
Fix document difference calculation
2 parents 1803397 + b871610 commit ecfd0b1

7 files changed

Lines changed: 584 additions & 8 deletions

File tree

examples/example.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from comparedocs import Comparator
2+
3+
4+
def compare_my_text_files():
5+
# create new comparator and give
6+
# the comparator document you wish
7+
# to use for comparison
8+
9+
doc_comp = Comparator('./text-files/Example.docx')
10+
11+
# load files you wish to compare
12+
# your text file against
13+
doc_comp.add_document('./text-files/Example.pdf')
14+
doc_comp.add_document('./text-files/romeo-and-juliet.txt')
15+
16+
results = doc_comp.compare()
17+
print(results)
18+
19+
20+
if __name__ == "__main__":
21+
compare_my_text_files()

examples/text-files/Example.docx

6.84 KB
Binary file not shown.

examples/text-files/Example.pdf

20.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)