help descriptions now understood by the cog files, no implementation yet, don't try to build this
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user