help descriptions now understood by the cog files, no implementation yet, don't try to build this

This commit is contained in:
Nicholas O'Connor
2017-03-24 23:05:31 -07:00
parent 405ba80d8d
commit a5a8fb284c
6 changed files with 42 additions and 1 deletions

View File

@@ -22,6 +22,14 @@ DLL_PUBLIC map<string, CommandFunction> cellar::commands::launch_commands() {
func = linesplit[1]
cog.outl("result.insert(pair<string,CommandFunction>(\"{0}\", &{1}));".format(name, func))
if (len(linesplit) > 2):
desc = " ".join(linesplit[2:]) # Rest of line assumed to be description
cog.outl("cellar::help::set_description(\"{0}\", \"{1}\");"
.format(name, desc
.replace("\"", "\\\"")
.replace("\\", "\\\\")))
# the replace methods escape " and \ characters
]]]*/
//[[[end]]]
return result;