[e-cvs] cvs commit: e/src/esrc/scripts fixdoc.e
markm@eros.cs.jhu.edu
markm@eros.cs.jhu.edu
Mon, 13 Aug 2001 21:43:02 -0400
markm 01/08/13 21:43:02
Modified: doc Makefile
src/esrc/scripts fixdoc.e
Log:
javadocs not crittable
Revision Changes Path
1.36 +1 -1 e/doc/Makefile
Index: Makefile
===================================================================
RCS file: /cvs/e/doc/Makefile,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- Makefile 2001/07/09 02:19:21 1.35
+++ Makefile 2001/08/14 01:43:01 1.36
@@ -32,7 +32,7 @@
# BOTTOM="'<center>comments? <i><a href=\"mailto:bugs@erights.org\">bugs@erights.org</a></i> or <a href=\"http://www.blindpay.com/crit-me-now.cgi\"><img src=\"http://www.erights.org/images/cmn.gif\" border=\"0\"></a></center>'"
HEADER=<a href=\"{@docroot}/../index.html\" target=\"_top\"><img src=\"{@docroot}/../images/e-lambda.gif\" border=\"0\"></a>
-BOTTOM=<center>comments? <i><a href=\"mailto:bugs@erights.org\">bugs@erights.org</a></i></center>
+BOTTOM=<center>comments? <i><a href=\"mailto:bugs@erights.org\">bugs@erights.org</a></i> or <a href="http://www.blindpay.com/crit-me-now.cgi"><img src="{@docroot}/../images/cmn.gif" width="98" height="21" border="0" align="middle"></a></center>
ER=org.erights.e
1.6 +18 -7 e/src/esrc/scripts/fixdoc.e
Index: fixdoc.e
===================================================================
RCS file: /cvs/e/src/esrc/scripts/fixdoc.e,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- fixdoc.e 2001/03/26 19:39:44 1.5
+++ fixdoc.e 2001/08/14 01:43:01 1.6
@@ -1,15 +1,25 @@
#!/usr/bin/env e
def ee__uriGetter := <import:org.erights.e.*>
-def subst := <ee:tools.text.subst>
def leaves := <ee:tools.files.leaves>
# Give all erights javadoc pages the standard erights background
def style := <file:javadoc/stylesheet.css>
-style setText(subst(style getText(), "-color: #FFFFFF",
- "-color: #FFEEDD"))
+style setText(style getText() replaceAll("-color: #FFFFFF",
+ "-color: #FFEEDD"))
+def fixAnchors(var text) :any {
+ def result := "" diverge(char)
+ while (text =~ `@left<A @attr="@value">@right`) {
+ def newValue := value replaceAll(", ", ",%20")
+ result append(`$left<A $attr="$newValue">`)
+ text := right
+ }
+ result append(text)
+ result snapshot()
+}
+
def fix(filedir, level) {
if (filedir isDirectory()) {
def subLevel := level+1
@@ -18,11 +28,12 @@
}
} else if (filedir getName() =~ `@_.html`) {
var text := filedir getText()
- text := subst(text, "BODY BGCOLOR=\"white\"",
- "BODY BGCOLOR=\"#FFEEDD\"")
+ text := text replaceAll("BODY BGCOLOR=\"white\"",
+ "BODY BGCOLOR=\"#FFEEDD\"")
# Should no longer be necessary, except for headers and footers
- text := subst(text, "{@docroot}/",
- "../" * level)
+ text := text replaceAll("{@docroot}/",
+ "../" * level)
+ text := fixAnchors(text)
filedir setText(text)
}
}