Skip to content

Commit

Permalink
htmldiff2
Browse files Browse the repository at this point in the history
This commit replaces htmldiff with htmldiff2 which is a friendly fork
that should make diffengine installation easier.

Fixes #57
Fixes #41
  • Loading branch information
edsu committed May 1, 2020
1 parent 204ce2d commit eb552c8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ that can be used for research purposes.

1. install [GeckoDriver]
1. install [Python 3]
1. `pip3 install --process-dependency-links diffengine`
1. `pip3 install diffengine`

## Run

Expand Down
4 changes: 2 additions & 2 deletions diffengine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import tweepy
import logging
import argparse
import htmldiff
import requests
import selenium
import htmldiff2
import feedparser
import subprocess
import readability
Expand Down Expand Up @@ -328,7 +328,7 @@ def _generate_diff_html(self):
return
tmpl_path = os.path.join(os.path.dirname(__file__), "diff.html")
logging.debug("creating html diff: %s", self.html_path)
diff = htmldiff.render_html_diff(self.old.html, self.new.html)
diff = htmldiff2.render_html_diff(self.old.html, self.new.html)
if "<ins>" not in diff and "<del>" not in diff:
return False
tmpl = jinja2.Template(codecs.open(tmpl_path, "r", "utf8").read())
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pyyaml>=5.1
tweepy
requests
selenium
htmldiff2
feedparser
readability-lxml
https://github.com/edsu/htmldiff/tarball/master#egg=htmldiff-0.2
envyaml>=0.1912
pre-commit==2.3.0
7 changes: 0 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
with open("README.md") as f:
long_description = f.read()

# hack until htmldiff is updated to work with python3 on pypi
htmldiff = "https://github.com/edsu/htmldiff/tarball/master#egg=htmldiff-0.2"
reqs.remove(htmldiff)
reqs.append("htmldiff==0.2")
deps = [htmldiff]

if __name__ == "__main__":
setup(
name="diffengine",
Expand All @@ -29,7 +23,6 @@
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=reqs,
dependency_links=deps,
setup_data={"diffengine": ["diffengine/diff.html"]},
setup_requires=["pytest-runner"],
tests_require=["pytest"],
Expand Down

0 comments on commit eb552c8

Please sign in to comment.