summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-18 14:56:55 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-07-18 14:56:55 (GMT)
commita67f0b6afda965a30f69c67e9dc0b7aed7584760 (patch)
tree75dcd018ab8560ca41595f55bc4f62658f4db68d /Utilities
parent0aa7d9dc109d429861fd86c893821672eb5228b8 (diff)
parent376ba93588e1dd24cb091c61f9fe635bceaf0a82 (diff)
downloadCMake-a67f0b6afda965a30f69c67e9dc0b7aed7584760.zip
CMake-a67f0b6afda965a30f69c67e9dc0b7aed7584760.tar.gz
CMake-a67f0b6afda965a30f69c67e9dc0b7aed7584760.tar.bz2
Merge topic 'identify-qthelp-artifacts'
376ba935 Help: Identify more artifact types in QtHelp documentation.
Diffstat (limited to 'Utilities')
-rwxr-xr-xUtilities/Sphinx/create_identifiers.py28
1 files changed, 21 insertions, 7 deletions
diff --git a/Utilities/Sphinx/create_identifiers.py b/Utilities/Sphinx/create_identifiers.py
index 4db7a3f..7715e53 100755
--- a/Utilities/Sphinx/create_identifiers.py
+++ b/Utilities/Sphinx/create_identifiers.py
@@ -19,13 +19,27 @@ if not lines:
newlines = []
for line in lines:
- if "<keyword name=\"command\"" in line:
- if not "id=\"" in line:
- prefix = "<keyword name=\"command\" "
- part1, part2 = line.split(prefix)
- head, tail = part2.split("#command:")
- cmdname, rest = tail.split("\"")
- line = part1 + prefix + "id=\"command/" + cmdname + "\" " + part2
+
+ mapping = (("command", "command"),
+ ("variable", "variable"),
+ ("target property", "prop_tgt"),
+ ("test property", "prop_test"),
+ ("source file property", "prop_sf"),
+ ("global property", "prop_gbl"),
+ ("module", "module"),
+ ("directory property", "prop_dir"),
+ ("cache property", "prop_cache"),
+ ("policy", "policy"),
+ ("installed file property", "prop_inst"))
+
+ for domain_object_string, domain_object_type in mapping:
+ if "<keyword name=\"" + domain_object_string + "\"" in line:
+ if not "id=\"" in line:
+ prefix = "<keyword name=\"" + domain_object_string + "\" "
+ part1, part2 = line.split(prefix)
+ head, tail = part2.split("#" + domain_object_type + ":")
+ domain_object, rest = tail.split("\"")
+ line = part1 + prefix + "id=\"" + domain_object_type + "/" + domain_object + "\" " + part2
newlines.append(line + "\n")
f = open(name, "w")