KO
|
EN
gitlite — search
Search
#python
#deep-learning
#javascript
#hacktoberfest
#react
#kubernetes
#keras
#machine-learning
#cli
#k8s
#json
#linux
diffparser
★ 75
Open GitHub ↗
Parse unified diffs with Java.
Download README (.md)
Explore Similar Repositories
salt-dashboard
:
dashboard for saltstack
go-virtualbox
:
VirtualBox wrappers in Go
traffickingGrab
:
A project intended to fight human trafficking by using the web as a database
TextFiction
:
Z-Machine interpreter for Android
Bare.Game
:
An open source modern minimal game cross platform gaming library
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
diffparser
?
Download (.md)
### diffparser [](https://travis-ci.org/thombergs/diffparser) Parse unified diffs with Java. ### Code example ``` DiffParser parser = new UnifiedDiffParser(); InputStream in = new FileInputStream("/path/to/file.diff"); List<Diff> diff = parser.parse(in); ``` ### What Diff formats can be parsed? Currently, the only implementation of the DiffParser interface is UnifiedDiffParser, which supports parsing of diffs like the following: ``` Modified: trunk/test1.txt =================================================================== --- /trunk/test1.txt 2013-10-23 19:41:56 UTC (rev 46) +++ /trunk/test1.txt 2013-10-23 19:44:39 UTC (rev 47) @@ -1,4 +1,3 @@ test1 -test1 +test234 -test1 \ No newline at end of file @@ -5,9 +6,10 @@ -test1 -test1 +aösdhasd +asdasd ``` An input stream may contain several sections like the above, delimited by an empty line. Each such section will be parsed into an object of class Diff. ### Latest Stable Release #### Download [  ](https://bintray.com/reflectoring/maven-releases/diffparser/_latestVersion) #### Maven ```xml ... <repositories> <repository> <id>jcenter</id> <url>https://jcenter.bintray.com/</url> </repository> </repositories> <dependencies> <dependency> <groupId>io.reflectoring.diffparser</groupId> <artifactId>diffparser</artifactId> <version>1.4</version> </dependency> </dependencies> ... ``` #### Gradle ```groovy repositories { jcenter() } dependencies { compile('io.reflectoring.diffparser:diffparser:1.4') } ``` ### Snapshots You can access the latest snapshot by adding "-SNAPSHOT" to the version number and adding the repository `https://oss.jfrog.org/artifactory/oss-snapshot-local` to your build. You can also reference a specific snapshot like `1.4-20171220.195055-1`. Here's the [list of snapshot versions](https://oss.jfrog.org/webapp/#/artifacts/browse/tree/General/oss-snapshot-local/io/reflectoring/diffparser/diffparser). #### Maven ```xml ... <repositories> <repository> <id>oss-snapshot-local</id> <url>https://oss.jfrog.org/webapp/#/artifacts/browse/tree/General/oss-snapshot-local/io/reflectoring/diffparser/diffparser</url> </repository> </repositories> <dependencies> <dependency> <groupId>io.reflectoring.diffparser</groupId> <artifactId>diffparser</artifactId> <version>1.5-SNAPSHOT</version> </dependency> </dependencies> ... ``` #### Gradle ```groovy repositories { maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } } dependencies { compile('io.reflectoring.diffparser:diffparser:1.5-SNAPSHOT') } ```