Skip to content
Snippets Groups Projects
Commit db8fedab authored by Victor Poughon's avatar Victor Poughon
Browse files

DOC: improve doc example comment

parent bd49bc0f
No related branches found
No related tags found
2 merge requests!621Release 7.0 (master),!316Christmas CookBook
......@@ -68,23 +68,23 @@ def GetApplicationExamplePythonSnippet(app,idx,expand = False, inputpath="",outp
appname = "app"
output = ""
output += ".. code-block:: python\n\n"
# Render example comment
if len(app.GetExampleComment(idx)) > 0:
output += app.GetExampleComment(idx) + ":\n\n"
output += ".. code-block:: python\n\n"
output += "\t# {}\n".format(app.GetExampleComment(idx))
output+= "\timport otbApplication" + linesep + linesep
output+= "\t" + appname + " = otbApplication.Registry.CreateApplication(\"" + app.GetName() + "\")" + linesep + linesep
output += "\timport otbApplication" + linesep + linesep
output += "\t" + appname + " = otbApplication.Registry.CreateApplication(\"" + app.GetName() + "\")" + linesep + linesep
for i in range(0, app.GetExampleNumberOfParameters(idx)):
param = app.GetExampleParameterKey(idx,i)
value = app.GetExampleParameterValue(idx,i)
paramtype = app.GetParameterType(param)
paramrole = app.GetParameterRole(param)
if paramtype == ParameterType_ListView:
break
break # TODO
if paramtype == ParameterType_Group:
break
break # TODO
if paramtype == ParameterType_Choice:
#app.SetParameterString(param,value)
output+= "\t" + appname + ".SetParameterString(" + EncloseString(param) + "," + EncloseString(value) + ")"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment