Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.DaisyDiff:daisydiff:release-1.2-NX4'
}
dependencies {
implementation("com.github.DaisyDiff:daisydiff:release-1.2-NX4")
}
<dependency>
<groupId>com.github.DaisyDiff</groupId>
<artifactId>daisydiff</artifactId>
<version>release-1.2-NX4</version>
</dependency>
libraryDependencies += "com.github.DaisyDiff" % "daisydiff" % "release-1.2-NX4"
:dependencies [[com.github.DaisyDiff/daisydiff "release-1.2-NX4"]]
This is a maintenance project of DaisyDiff in Java. The initial commit is a checkout of version 1.2 of old DaisyDiff project.
For more documentation see daisydiff.github.io.
WARNING The maintenance of this repository by the Nuxeo organization is now strictly limited to critical security fixes. If you need some other kind of maintenance, please check the repository's forks or fork it yourself.
java -jar daisydiff-1.2-NX4-SNAPSHOT-jar-with-dependencies.jar [oldHTML] [newHTML] [optional arguments]
Optional Arguments:
Example:
java -jar daisydiff-1.2-NX4-SNAPSHOT-jar-with-dependencies.jar http://web.archive.org/web/20070107145418/http://news.bbc.co.uk/ http://web.archive.org/web/20070107182640/http://news.bbc.co.uk/ --css=http://web.archive.org/web/20070107145418/http://news.bbc.co.uk/nol/shared/css/news_r5.css
Requirements: Java 1.5 or 6
org.outerj.daisy.diff.DaisyDiff{
/**
* Diffs two html files, outputting the result to the specified consumer.
*/
public static void diffHTML(InputSource oldSource, InputSource newSource, ContentHandler consumer, String prefix, Locale locale) throws SAXException, IOException;
/**
* Diffs two html files word for word as source, outputting the result to
* the specified consumer.
*/
public static void diffTag(String oldText, String newText, ContentHandler consumer) throws Exception;
}
Requirements: Java 1.5 or 6
To run Daisy Diff embedded in your application, you don't need the entire Jar file. A much smaller Jar file without Xerces and NekoHtml will suffice.
The DaisyDiff algorithm has been integrated in MediaWiki. However, it had major errors and has been pulled out. More info at www.mediawiki.org/wiki/Visual_Diff. See also github.com/cdauth/htmldiff.