[GRASS-SVN] r62857 - in grass/branches/releasebranch_7_0: . lib/gis man
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 22 04:12:00 PST 2014
Author: neteler
Date: 2014-11-22 04:12:00 -0800 (Sat, 22 Nov 2014)
New Revision: 62857
Modified:
grass/branches/releasebranch_7_0/
grass/branches/releasebranch_7_0/lib/gis/parser_html.c
grass/branches/releasebranch_7_0/man/build_keywords.py
Log:
manual: keyword index HTML'ized
Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
- /grass/trunk:60817,61096,61141,62179-62180,62182,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750,62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62831,62838,62847
+ /grass/trunk:60817,61096,61141,62179-62180,62182,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750,62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824,62831,62838,62847,62856
Modified: grass/branches/releasebranch_7_0/lib/gis/parser_html.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/parser_html.c 2014-11-22 12:11:07 UTC (rev 62856)
+++ grass/branches/releasebranch_7_0/lib/gis/parser_html.c 2014-11-22 12:12:00 UTC (rev 62857)
@@ -323,12 +323,15 @@
void print_escaped_for_html_keywords(FILE * f, const char * str)
{
+ /* generate HTML links */
+
/* HTML link only for second keyword */
if (st->n_keys > 1 &&
strcmp(st->module_info.keywords[1], str) == 0) {
const char *s;
+ /* TODO: fprintf(f, _("topic: ")); */
fprintf(f, "<a href=\"topic_");
for (s = str; *s; s++) {
switch (*s) {
@@ -339,8 +342,32 @@
}
fprintf(f, ".html\">%s</a>", str);
}
- else {
- fprintf(f, "%s", str);
+ else { /* first and other than second keyword */
+ if (st->n_keys > 0 &&
+ strcmp(st->module_info.keywords[0], str) == 0) {
+ /* command family */
+ const char *s;
+
+ fprintf(f, "<a href=\"");
+ for (s = str; *s; s++) {
+ switch (*s) {
+ do_escape(' ', "_");
+ default:
+ fputc(*s, f);
+ }
+ }
+ fprintf(f, ".html\">%s</a>", str);
+ } else {
+ /* keyword index */
+ if (st->n_keys > 0 &&
+ strcmp(st->module_info.keywords[2], str) == 0) {
+
+ /* TODO: fprintf(f, _("keywords: ")); */
+ fprintf(f, "<a href=\"keywords.html#%s\">%s</a>", str, str);
+ } else {
+ fprintf(f, "<a href=\"keywords.html#%s\">%s</a>", str, str);
+ }
+ }
}
}
#undef do_escape
Modified: grass/branches/releasebranch_7_0/man/build_keywords.py
===================================================================
--- grass/branches/releasebranch_7_0/man/build_keywords.py 2014-11-22 12:11:07 UTC (rev 62856)
+++ grass/branches/releasebranch_7_0/man/build_keywords.py 2014-11-22 12:12:00 UTC (rev 62857)
@@ -34,13 +34,14 @@
keys = lines[index_keys].split(',')
except:
continue
+ print keys
for key in keys:
key = key.strip()
try:
key = key.split('>')[1].split('<')[0]
except:
pass
- key = "%s%s" % (key[0].upper(), key[1:])
+ #key = "%s%s" % (key[0].upper(), key[1:])
if key not in keywords.keys():
keywords[key] = []
keywords[key].append(fname)
More information about the grass-commit
mailing list