TGT_BASE=lustre_manual
MASTER_URL=http://build.whamcloud.com/job/lustre-manual/lastSuccessfulBuild/
-MASTER_XHTML=$(MASTER_URL)/artifact/_out/$(TGT_BASE).xhtml
+MASTER_URL_LAB=http://build.lab.whamcloud.com:8080/job/lustre-manual/lastSuccessfulBuild/
+MASTER_XHTML=$(MASTER_URL)/artifact/$(TGT_BASE).xhtml
+MASTER_XHTML_LAB=$(MASTER_URL_LAB)/artifact/$(TGT_BASE).xhtml
TGT_MASTER=$(TMP)/mastermanual
$(shell ls -d $(XSL_MAC) 2> /dev/null))
.PHONY: all
-all: clean xhtml html pdf
+all: clean check xhtml html pdf diff
.PHONY: check
check: $(SRC_XML)
# get the git hash for the last successful build of the manual
.PHONY: mastermanual.revision
mastermanual.revision:
- wget -O mastermanual.index $(MASTER_URL)
+ wget -O mastermanual.index $(MASTER_URL) || wget -O mastermanual.index $(MASTER_URL_LAB)
awk '/Revision/ { print $$NF }' mastermanual.index > mastermanual.revision
# only fetch the full manual if we don't have it or the manual changed
$(TGT_MASTER).xhtml: mastermanual.revision
if ! cmp -s mastermanual.revision $(TGT_MASTER).revision ; then\
- wget -O $(TGT_MASTER).xhtml $(MASTER_XHTML) && \
+ (wget -O $(TGT_MASTER).xhtml $(MASTER_XHTML) || \
+ wget -O $(TGT_MASTER).xhtml $(MASTER_XHTML_LAB)) && \
mv mastermanual.revision $(TGT_MASTER).revision;\
fi
.PHONY: diff
diff: $(TGT_BASE).xhtml $(TGT_MASTER).xhtml
- ./tools/diff.py $(TGT_MASTER).xhtml $(TGT_BASE).xhtml > $(TGT_BASE).diff
+ ./tools/diff.py $(TGT_MASTER).xhtml $(TGT_BASE).xhtml > $(TGT_BASE).diff.html
.PHONY: push
# @@ need to do something more complicated here
# call textDiff but not for html, but for some html... ugh
# gonna cop-out for now
- out.append('<span class="replace" style="background-color: Pink; text-decoration: line-through;">'+''.join(a[e[1]:e[2]]) + '</span><span class="insert" style="background-color: PaleGreen;">'+''.join(b[e[3]:e[4]])+"</span>")
+ # I've put this hack in to try accomodate id's generated by docbook compilation. RJH 30/12/2011
+ if '<a id="id' in a[e[1]:e[2]][0] or \
+ '<a href="#id' in a[e[1]:e[2]][0] or \
+ '<a id="ftn.id' in a[e[1]:e[2]][0] or \
+ '<a class="indexterm" href="#id' in a[e[1]:e[2]][0] or \
+ '<a id="id' in b[e[3]:e[4]][0] or \
+ '<a href="#id' in b[e[3]:e[4]][0] or \
+ '<a id="ftn.id' in b[e[3]:e[4]][0] or \
+ '<a class="indexterm" href="#id' in b[e[3]:e[4]][0]:
+ out.append(''.join(b[e[3]:e[4]]))
+ else:
+ out.append('<a name="change"><span class="replace" style="background-color: Pink; text-decoration: line-through;">'+''.join(a[e[1]:e[2]]) + '</span><span class="insert" style="background-color: PaleGreen;">'+''.join(b[e[3]:e[4]])+"</span></a>")
elif e[0] == "delete":
- out.append('<span class="del" style="background-color: Pink; text-decoration: line-through;">' + ''.join(a[e[1]:e[2]]) + "</span>")
+ out.append('<a name="change"><span class="del" style="background-color: Pink; text-decoration: line-through;">' + ''.join(a[e[1]:e[2]]) + "</span></a>")
elif e[0] == "insert":
- out.append('<span class="ins" style="background-color: PaleGreen;">'+''.join(b[e[3]:e[4]]) + "</span>")
+ out.append('<a name="change"><span class="ins" style="background-color: PaleGreen;">'+''.join(b[e[3]:e[4]]) + "</span></a>")
elif e[0] == "equal":
out.append(''.join(b[e[3]:e[4]]))
else: