Commit db8fedab authored by Victor Poughon's avatar Victor Poughon

DOC: improve doc example comment

parent bd49bc0f
......@@ -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) + ")"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment