'agedu:' prefix at the start of the title of output web pages.
git-svn-id: svn://svn.tartarus.org/sgt/agedu@9246
cda61777-01e9-0310-a592-
d414129be87e
directory will be created if it does not already exist, and the
output HTML files will be created inside it.
directory will be created if it does not already exist, and the
output HTML files will be created inside it.
-The following options affect the web server mode \cw{-w}, and in one
-case also the stand-alone HTML generation mode \cw{-H}:
+The following options affect the web server mode \cw{-w}, and in some
+cases also the stand-alone HTML generation mode \cw{-H}:
\dt \cw{-r} \e{age range} or \cw{--age-range} \e{age range}
\dt \cw{-r} \e{age range} or \cw{--age-range} \e{age range}
password, followed \e{immediately} by end of file (no trailing
newline, or else it will be considered part of the password).
password, followed \e{immediately} by end of file (no trailing
newline, or else it will be considered part of the password).
+\dt \cw{--title} \e{title}
+
+\dd Specify the string that appears at the start of the <title>
+section of the output HTML pages. The default is \cq{agedu}. This
+title is followed by a colon and then the path you're viewing within
+the index file. You might use this option if you were serving
+\cw{agedu} reports for several different servers and wanted to make it
+clearer which one a user was looking at.
+
\dt \cw{--no-eof}
\dd Stop \cw{agedu} in web server mode from looking for end-of-file on
\dt \cw{--no-eof}
\dd Stop \cw{agedu} in web server mode from looking for end-of-file on
HELPARG("filename") HELPOPT("[--web] read HTTP Basic user/pass from file") \
VAL(AUTHFD) LONG(auth_fd) \
HELPARG("fd") HELPOPT("[--web] read HTTP Basic user/pass from fd") \
HELPARG("filename") HELPOPT("[--web] read HTTP Basic user/pass from file") \
VAL(AUTHFD) LONG(auth_fd) \
HELPARG("fd") HELPOPT("[--web] read HTTP Basic user/pass from fd") \
+ VAL(HTMLTITLE) LONG(title) \
+ HELPARG("title") HELPOPT("[--web,--html] title prefix for web pages") \
VAL(DEPTH) SHORT(d) LONG(depth) LONG(max_depth) LONG(maximum_depth) \
HELPARG("levels") HELPOPT("[--text,--html] recurse to this many levels") \
VAL(MINAGE) SHORT(a) LONG(age) LONG(min_age) LONG(minimum_age) \
VAL(DEPTH) SHORT(d) LONG(depth) LONG(max_depth) LONG(maximum_depth) \
HELPARG("levels") HELPOPT("[--text,--html] recurse to this many levels") \
VAL(MINAGE) SHORT(a) LONG(age) LONG(min_age) LONG(minimum_age) \
int httpserverport = 0;
const char *httpauthdata = NULL;
const char *outfile = NULL;
int httpserverport = 0;
const char *httpauthdata = NULL;
const char *outfile = NULL;
+ const char *html_title = PNAME;
int auth = HTTPD_AUTH_MAGIC | HTTPD_AUTH_BASIC;
int progress = 1;
struct inclusion_exclusion *inex = NULL;
int auth = HTTPD_AUTH_MAGIC | HTTPD_AUTH_BASIC;
int progress = 1;
struct inclusion_exclusion *inex = NULL;
case OPT_OUTFILE:
outfile = optval;
break;
case OPT_OUTFILE:
outfile = optval;
break;
+ case OPT_HTMLTITLE:
+ html_title = optval;
+ break;
case OPT_MINAGE:
textcutoff = parse_age(now, optval);
break;
case OPT_MINAGE:
textcutoff = parse_age(now, optval);
break;
cfg.newest = htmlnewest;
cfg.showfiles = showfiles;
}
cfg.newest = htmlnewest;
cfg.showfiles = showfiles;
}
+ cfg.html_title = html_title;
pcfg.oldest = htmloldest;
pcfg.newest = htmlnewest;
pcfg.showfiles = showfiles;
pcfg.oldest = htmloldest;
pcfg.newest = htmlnewest;
pcfg.showfiles = showfiles;
+ pcfg.html_title = html_title;
run_httpd(mappedfile, auth, &dcfg, &pcfg);
munmap(mappedfile, totalsize);
} else if (mode == REMOVE) {
run_httpd(mappedfile, auth, &dcfg, &pcfg);
munmap(mappedfile, totalsize);
} else if (mode == REMOVE) {
*/
htprintf(ctx, "<head>\n");
trie_getpath(t, index, path);
*/
htprintf(ctx, "<head>\n");
trie_getpath(t, index, path);
- htprintf(ctx, "<title>%s: ", PNAME);
+ htprintf(ctx, "<title>");
+ htescape(ctx, cfg->html_title, strlen(cfg->html_title), 0);
+ htprintf(ctx, ": ");
htescape(ctx, path, strlen(path), 0);
htprintf(ctx, "</title>\n");
htprintf(ctx, "</head>\n");
htescape(ctx, path, strlen(path), 0);
htprintf(ctx, "</title>\n");
htprintf(ctx, "</head>\n");
* directories in the report.
*/
int showfiles;
* directories in the report.
*/
int showfiles;
+ /*
+ * The string appearing in the <title> part of HTML pages, before
+ * a colon followed by the path being served. Default is "agedu".
+ */
+ const char *html_title;