From db8fedab6be0dc503e6293efc83f893505e948e4 Mon Sep 17 00:00:00 2001 From: Victor Poughon <victor.poughon@cnes.fr> Date: Tue, 11 Dec 2018 12:09:21 +0100 Subject: [PATCH] DOC: improve doc example comment --- .../Cookbook/Scripts/otbGenerateWrappersRstDoc.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py index a80fba0023..d93f545550 100755 --- a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py +++ b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py @@ -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) + ")" -- GitLab