Skip to content

Commit 0b969e5

Browse files
committed
A bunch of changes
1 parent c80f0e8 commit 0b969e5

21 files changed

+135
-75
lines changed

_appledoclayouts/default.html

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,9 @@
66
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
77
<meta name="robots" content="anchors"/>
88

9-
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
10-
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/vd.css">
11-
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/toc.css">
12-
13-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
14-
<script src="javascripts/jquery.cookie.js"></script>
15-
<script src="javascripts/jquery.tocLight.js"></script>
16-
17-
<script type="text/javascript">
18-
$(function() {
19-
$.toc.clickHideButton();
20-
});
9+
<link rel="stylesheet" type="text/css" media="screen" href="{{ site.prefixDir }}css/stylesheet.css">
10+
<link rel="stylesheet" type="text/css" media="screen" href="{{ site.prefixDir }}css/vd.css">
11+
<link rel="stylesheet" type="text/css" media="screen" href="{{ site.prefixDir }}css/toc.css">
2112
</script>
2213

2314
</head>

_config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
markdown: rdiscount
22
pygments: true
3-
showToggleButton: true
3+
4+
# Needed only when generate Apple Help
5+
showToggleButton: false
6+
prefixDir: ../../common/

_layouts/default.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
<link rel="shortcut icon" href="image/favicon.ico" type="image/x-icon">
1010
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
1111

12-
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
13-
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/vd.css">
14-
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/toc.css">
12+
<link rel="stylesheet" type="text/css" media="screen" href="css/stylesheet.css">
13+
<link rel="stylesheet" type="text/css" media="screen" href="css/vd.css">
14+
<link rel="stylesheet" type="text/css" media="screen" href="css/toc.css">
1515

1616
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
17-
<script src="javascripts/jquery.cookie.js"></script>
18-
<script src="javascripts/jquery.tocLight.js"></script>
17+
<script src="js/jquery.cookie.js"></script>
18+
<script src="js/jquery.tocLight.js"></script>
1919

2020
<title>VisualDiffer - {{ page.title }}</title>
2121

alignRules.md

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,107 @@ If the last scenario is true, the alignment will try to be smart, first it searc
7070

7171
# Align by user defined rules (not available on OSX 10.6 Snow Leopard)
7272

73-
TODO
73+
There are scenarios where it is necessary to align files having different names.
74+
75+
The most simple scenario has files with same name but different extension as shown below
76+
77+
<table class="bordered">
78+
<tr>
79+
<th>Left</th>
80+
<th>Right</th>
81+
</tr>
82+
<tr>
83+
<td>001.jpg</td>
84+
<td>&nbsp;</td>
85+
</tr>
86+
<tr>
87+
<td>&nbsp;</td>
88+
<td>001.raw</td>
89+
</tr>
90+
<tr>
91+
<td>002.jpg</td>
92+
<td>&nbsp;</td>
93+
</tr>
94+
<tr>
95+
<td>&nbsp;</td>
96+
<td>002.RAW</td>
97+
</tr>
98+
</table>
99+
100+
Suppose you want to align ignoring the file extension to produce the result shown below
101+
102+
<table class="bordered">
103+
<tr>
104+
<th>Left</th>
105+
<th>Right</th>
106+
</tr>
107+
<tr>
108+
<td>001.jpg</td>
109+
<td>001.raw</td>
110+
</tr>
111+
<td>002.jpg</td>
112+
<td>002.RAW</td>
113+
</tr>
114+
</table>
115+
116+
This can be achieved using VisualDiffer 'user defined alignment rules'.
117+
118+
## Managing alignment rules
119+
120+
You can create, edit or delte rules from Session Preferences Dialog
121+
122+
![image]({{ site.prefixDir }}images/screenshots/sessionPrefAlignment.png)
123+
124+
More rules can be assigned to a VisualDiffer session comparison, they are evaluated from top to bottom.
125+
126+
## Creating a rule
127+
128+
When you add a new rule (or edit an existing one) you access to the dialog shown below
129+
130+
![image]({{ site.prefixDir }}images/screenshots/alignRule.png)
131+
132+
A rule has
133+
134+
- a left **regular** expression
135+
- a right **pattern** expression
136+
137+
_If you are not familiar with regular expressions please refer to [ICU](http://userguide.icu-project.org/strings/regexp) documentation._
138+
139+
## Left regular expression
140+
141+
The left regexp is used to match a filename on the left side of VisualDiffer Folder View, we want to find all jpg files so we create a group `(.*)` followed by `.jpg` extension.
142+
143+
## Right pattern expression
144+
145+
Notice the right expression **isn't** a regular expression, it should contain some special patterns used to access to regular expression groups (if any).
146+
147+
The right expression is used to match a file name on right side of VisualDiffer Folder View, we want to match `.raw` files having the **same name** of file on left side.
148+
So we use the `$1` to get the first group present on regexp (in this example there is only one group but you can have nine groups).
149+
150+
Now if you save the rule and then run the comparison you obtain the result shown below
151+
152+
<table class="bordered">
153+
<tr>
154+
<th>Left</th>
155+
<th>Right</th>
156+
</tr>
157+
<tr>
158+
<td>001.jpg</td>
159+
<td>001.raw</td>
160+
</tr>
161+
<tr>
162+
<td>002.jpg</td>
163+
<td>&nbsp;</td>
164+
</tr>
165+
<tr>
166+
<td>&nbsp;</td>
167+
<td>002.RAW</td>
168+
</tr>
169+
</table>
170+
171+
But `002.jpg` and `002.RAW` files are not aligned because `002.RAW` extension is uppercase, this can be easily fixed ignoring the case on right expression as shown in figure shown below
172+
173+
![image]({{ site.prefixDir }}images/screenshots/alignRuleIgnoreCase.png)
174+
175+
## Test Rule
176+
TODO
Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ form {
263263
padding: 20px;
264264
}
265265

266-
img {
266+
/*img {
267267
width: 100%;
268268
max-width: 100%;
269269
}
270-
270+
*/
271271
/*******************************************************************************
272272
Full-Width Styles
273273
*******************************************************************************/
@@ -302,7 +302,7 @@ Full-Width Styles
302302
font-size: 42px;
303303
font-weight: 700;
304304
text-shadow: #111 0px 0px 10px;
305-
background: url("/images/logo.png") no-repeat scroll 0 0 transparent;
305+
background: url("../images/logo.png") no-repeat scroll 0 0 transparent;
306306
}
307307

308308
#project_title > a {
@@ -319,45 +319,6 @@ Full-Width Styles
319319
margin: 0;
320320
}
321321

322-
#downloads {
323-
position: absolute;
324-
width: 210px;
325-
z-index: 10;
326-
bottom: -40px;
327-
right: 0;
328-
height: 70px;
329-
background: url('../images/icon_download.png') no-repeat 0% 90%;
330-
}
331-
332-
.zip_download_link {
333-
display: block;
334-
float: right;
335-
width: 90px;
336-
height:70px;
337-
text-indent: -5000px;
338-
overflow: hidden;
339-
background: url(../images/sprite_download.png) no-repeat bottom left;
340-
}
341-
342-
.tar_download_link {
343-
display: block;
344-
float: right;
345-
width: 90px;
346-
height:70px;
347-
text-indent: -5000px;
348-
overflow: hidden;
349-
background: url(../images/sprite_download.png) no-repeat bottom right;
350-
margin-left: 10px;
351-
}
352-
353-
.zip_download_link:hover {
354-
background: url(../images/sprite_download.png) no-repeat top left;
355-
}
356-
357-
.tar_download_link:hover {
358-
background: url(../images/sprite_download.png) no-repeat top right;
359-
}
360-
361322
#main_content_wrap {
362323
background: #f2f2f2;
363324
border-top: 1px solid #111;
@@ -379,12 +340,13 @@ Full-Width Styles
379340

380341

381342
#project_title_small {
382-
margin: 0;
343+
margin: 0 0 0 10px;
383344
color: #fff;
384345
font-size: 24px;
385346
font-weight: 700;
386347
text-shadow: #111 0px 0px 10px;
387-
background: url("/images/appicon32.png") no-repeat scroll 0 0 transparent;
348+
background: url("../images/logo.png") no-repeat scroll 0 0 transparent;
349+
background-size: 32px 32px;
388350
}
389351

390352
#project_title_small > span {
@@ -398,7 +360,7 @@ Full-Width Styles
398360
font-weight: 300;
399361
background: none;
400362
text-shadow: #111 0px 0px 10px;
401-
margin: 0;
363+
margin: 0 0 0 10px;
402364
padding: 0 0 10px;
403365
}
404366

File renamed without changes.

stylesheets/vd.css renamed to css/vd.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ img.folder-legend {
1616
}
1717

1818
#main_content a[href ^="https://"], .link-https {
19-
background: url('/images/lock-icon.png') center right no-repeat;
19+
background: url('../images/lock-icon.png') center right no-repeat;
2020
padding-right: 16px;
2121
}
2222

2323
#main_content a[href ^="http://"], .link-external {
24-
background: url('/images/external-icon.png') center right no-repeat;
24+
background: url('../images/external-icon.png') center right no-repeat;
2525
padding-right: 16px;
2626
}
2727

@@ -47,4 +47,4 @@ td.file-legend-missing-right {
4747

4848
td.file-legend-merged {
4949
background-color: rgb(255, 204, 0);
50-
}
50+
}

foldersLegend.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,35 @@ Folders are shown using different colors to quickly visualize the files comparis
1616
<th>Description</th>
1717
</tr>
1818
<tr>
19-
<td><img class="folder-legend" src="images/folder/folder-000.png"></img></td>
19+
<td><img class="folder-legend" src="{{ site.prefixDir }}images/folder/folder-000.png"></img></td>
2020
<td>Matched folder (all contained files are same on other side)</td>
2121
</tr>
2222
<tr>
23-
<td><img class="folder-legend" src="images/folder/folder-001.png"></img></td>
23+
<td><img class="folder-legend" src="{{ site.prefixDir }}images/folder/folder-001.png"></img></td>
2424
<td>Folder contains only older files than other side</td>
2525
</tr>
2626
<tr>
27-
<td><img class="folder-legend" src="images/folder/folder-010.png"></img></td>
27+
<td><img class="folder-legend" src="{{ site.prefixDir }}images/folder/folder-010.png"></img></td>
2828
<td>Folder contains only modified files</td>
2929
</tr>
3030
<tr>
31-
<td><img class="folder-legend" src="images/folder/folder-011.png"></img></td>
31+
<td><img class="folder-legend" src="{{ site.prefixDir }}images/folder/folder-011.png"></img></td>
3232
<td>Folder contains only modified files and files older than other side</td>
3333
</tr>
3434
<tr>
35-
<td><img class="folder-legend" src="images/folder/folder-100.png"></img></td>
35+
<td><img class="folder-legend" src="{{ site.prefixDir }}images/folder/folder-100.png"></img></td>
3636
<td>Folder contains only files not present on other side (so called orphan folder)</td>
3737
</tr>
3838
<tr>
39-
<td><img class="folder-legend" src="images/folder/folder-101.png"></img></td>
39+
<td><img class="folder-legend" src="{{ site.prefixDir }}images/folder/folder-101.png"></img></td>
4040
<td>Folder contains files not present on other side and files older that other side</td>
4141
</tr>
4242
<tr>
43-
<td><img class="folder-legend" src="images/folder/folder-110.png"></img></td>
43+
<td><img class="folder-legend" src="{{ site.prefixDir }}images/folder/folder-110.png"></img></td>
4444
<td>Folder contains modified files and files not present on the other side</td>
4545
</tr>
4646
<tr>
47-
<td><img class="folder-legend" src="images/folder/folder-999.png"></img></td>
47+
<td><img class="folder-legend" src="{{ site.prefixDir }}images/folder/folder-999.png"></img></td>
4848
<td>Folder matches file filters or is empty and the 'Empty folders' setting is set to on</td>
4949
</tr>
5050
</table>

images/appicon32.png

-2.31 KB
Binary file not shown.

0 commit comments

Comments
 (0)