Skip to content

Commit 5174382

Browse files
Initial import from old project at Google Code. Removed obsolete links. Updated redirected links.
0 parents  commit 5174382

File tree

10 files changed

+125
-0
lines changed

10 files changed

+125
-0
lines changed

CustomizingHtmlOutput.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: default
3+
---
4+
5+
# Html Presentation
6+
7+
By default Daisy Diff is using the [Dojo Toolkit](http://www.dojotoolkit.org/) for presentation of the html output. This offers annotation tooltips on the result that allow the user to move back and forth between differences.
8+
9+
Default Values are
10+
11+
* Added text is shown in green background
12+
* Removed text is shown in red background
13+
* Formatted text is shown with a blue underline and tooltip
14+
* Special styles for images that show coloured layers
15+
16+
Here is an example (HTML mode):
17+
18+
![HTML mode](images/daisyDiffHtmlMode.png)
19+
20+
# Changing the default styles
21+
22+
You can change the default presentation by updating (or replacing) the CSS used by the resulting file. Open the `diff.css` file to look at the present values.
23+
24+
Inside the file you will see several CSS declarations such as
25+
26+
1. span.diff-html-removed (removed text in html mode)
27+
2. span.diff-html-added (added text in html mode)
28+
3. span.diff-html-changed (formatted text in html mode)
29+
30+
Override/Change this values are you are free to customize the presentation!
31+
32+
# Simple Example
33+
34+
Let's assume that instead of the default values you want to have the following
35+
36+
1. blue text for additions
37+
2. red strike-through text for removals
38+
3. dotted underlines for formatting changes
39+
4. default values for the images
40+
41+
You modify the css file as below
42+
43+
```
44+
span.diff-html-removed { color: red; text-decoration: line-through; cursor: default; }
45+
span.diff-html-added { color: blue; cursor: default; }
46+
span.diff-html-changed { color: black; border-bottom: dotted 2px red; cursor: default; text-decoration: none; }
47+
```
48+
49+
and now you have the requested result!
50+
51+
![Alternative CSS](images/AlternativeCSS.png)

Examples.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
layout: default
3+
---
4+
5+
BBC News example
6+
7+
This example uses the BBC news archive site to compare the news page at different times on a given day. The page can load slowly due to the slow servers at archive.org. The page layout is somewhat shifted in the example because the page is not hosted on the BBC servers.
8+
Result
9+
10+
[old HTML](http://web.archive.org/web/20070107145418/http://news.bbc.co.uk/) - [new HTML](http://web.archive.org/web/20070107182640/http://news.bbc.co.uk/)
11+
12+
Command
13+
14+
```
15+
java -jar daisydiff.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
16+
Diffing local HTML files
17+
```
18+
19+
Command
20+
21+
```
22+
java -jar daisydiff.jar file:///c:/sites/old.html file:///c:/sites/new.html
23+
```

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#gem 'jekyll', '3.0.0.pre.beta4'
2+
#gem 'jekyll', '3.0.1'
3+
source 'https://rubygems.org'
4+
gem 'github-pages'
5+
gem 'jekyll-sitemap'

Papers.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
layout: default
3+
---
4+
5+
* [http://pages.cs.wisc.edu/~yuanwang/papers/xdiff.pdf](http://pages.cs.wisc.edu/~yuanwang/papers/xdiff.pdf)
6+
* [https://sourceforge.net/projects/diffxml/files/documentation/1.0/dissertation.ps/download](https://sourceforge.net/projects/diffxml/files/documentation/1.0/dissertation.ps/download)
7+
* [http://conferences.idealliance.org/extreme/html/2005/Schaffert01/EML2005Schaffert01.html](http://conferences.idealliance.org/extreme/html/2005/Schaffert01/EML2005Schaffert01.html)
8+
* [http://citeseer.ist.psu.edu/rd/69327360%2C650653%2C1%2C0.25%2CDownload/http%3AqSqqSqwww.dlsi.ua.esqSq%7EcarrascoqSqxmldocsqSq0282.pdf](http://citeseer.ist.psu.edu/rd/69327360%2C650653%2C1%2C0.25%2CDownload/http%3AqSqqSqwww.dlsi.ua.esqSq%7EcarrascoqSqxmldocsqSq0282.pdf)
9+
10+

_config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
gems:
2+
- jekyll-sitemap
3+
markdown: kramdown
4+
highlighter: rouge
5+
kramdown:
6+
input: GFM
7+
auto_ids: true
8+
footnote_nr: 1
9+
entity_output: as_char
10+
toc_levels: 1..6
11+
smart_quotes: lsquo,rsquo,ldquo,rdquo
12+
enable_coderay: false
13+
14+
coderay:
15+
coderay_wrap: div
16+
coderay_line_numbers: inline
17+
coderay_line_number_start: 1
18+
coderay_tab_width: 4
19+
coderay_bold_every: 10
20+
coderay_css: style

_layouts/default.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ content }}

images/AlternativeCSS.png

2.24 KB
Loading

images/daisyDiffHtmlMode.png

3.86 KB
Loading

images/daisyDiffTagMode.png

3.78 KB
Loading

index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: default
3+
---
4+
5+
# What Daisy Diff offers
6+
7+
One of the most important features of Daisy Diff is the fact that it "understands" HTML tags and will actually look into the text to decide if a node is same for not.
8+
9+
For example assume that a user has changed a single word in a big paragraph. Most XML libraries would just mark the whole paragraph as different. Daisy Diff however will look into the inline text (the contents of the p tag node) and understand that only one word is different. Therefore it will present to the user *only* this word as changed.
10+
11+
DaisyDiff is also used in production (Daisy CMS) and also comes with a business friendly licence.
12+
13+
* [CustomizingHtmlOutput](CustomizingHtmlOutput)
14+
* [Examples](Examples)
15+
* [Papers](Papers)

0 commit comments

Comments
 (0)