예제 #1
0
 def help(self):
     name = self.commandLineName().split(':')[1].lower()
     filename = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), 'help', name + '.rst')
     try:
       html = getHtmlFromRstFile(filename)
       return True, html
     except:
       return False, None
 def help(self):
     name = self.commandLineName().split(':')[1].lower()
     filename = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), 'help', name + '.rst')
     try:
       html = getHtmlFromRstFile(filename)
       return True, html
     except:
       return False, None
예제 #3
0
    def help(self):
        [folder, filename] = os.path.split(self.descriptionFile)
        [filename, _] = os.path.splitext(filename)
        helpfile = os.path.join(folder, "doc", filename + ".html")

        if os.path.exists(helpfile):
            return True, getHtmlFromRstFile(helpfile)
        else:
            return False, None
예제 #4
0
 def help(self):
     [folder, filename] = os.path.split(self.descriptionFile)
     [filename, _] = os.path.splitext(filename)
     helpfile = os.path.join(folder, "doc", filename+".html")
     
     if os.path.exists(helpfile):
         return True, getHtmlFromRstFile(helpfile)
     else:
         return False, None
예제 #5
0
 def help(self):
     name = self.cmdname.lower()
     validChars = 'abcdefghijklmnopqrstuvwxyz'
     name = ''.join(c for c in name if c in validChars)
     html = getHtmlFromRstFile(os.path.join(os.path.dirname(__file__), 'help',
                         name + '.rst'))
     imgpath = os.path.join(os.path.dirname(__file__),os.pardir, os.pardir, 'images', 'saga100x100.jpg')
     html = ('<img src="%s"/>' % imgpath) + html
     return True, html
예제 #6
0
 def help(self):
     name = self.cmdname.lower()
     validChars = "abcdefghijklmnopqrstuvwxyz"
     name = "".join(c for c in name if c in validChars)
     html = getHtmlFromRstFile(os.path.join(os.path.dirname(__file__), "help", name + ".rst"))
     if html is None:
         return True, None
     imgpath = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, "images", "saga100x100.jpg")
     html = ('<img src="%s"/>' % imgpath) + html
     return True, html
예제 #7
0
 def help(self):
     name = self.cmdname.lower()
     validChars = 'abcdefghijklmnopqrstuvwxyz'
     name = ''.join(c for c in name if c in validChars)
     html = getHtmlFromRstFile(
         os.path.join(os.path.dirname(__file__), 'help', name + '.rst'))
     imgpath = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
                            'images', 'saga100x100.jpg')
     html = ('<img src="%s"/>' % imgpath) + html
     return True, html
예제 #8
0
    def help(self):
        """Returns the help with the description of this algorithm.
        It returns a tuple boolean, string. IF the boolean value is true, it means that
        the string contains the actual description. If false, it is an url or path to a file
        where the description is stored.

        Returns None if there is no help file available.

        The default implementation looks for an rst file in a help folder under the folder
        where the algorithm is located.
        The name of the file is the name console name of the algorithm, without the namespace part
        """
        name = self.commandLineName().split(':')[1].lower()
        filename = os.path.join(os.path.dirname(inspect.getfile(self.__class__)), 'help', name + '.rst')
        print filename
        try:
            html = getHtmlFromRstFile(filename)
            return True, html
        except:
            return False, None
예제 #9
0
    def help(self):
        """Returns the help with the description of this algorithm.
        It returns a tuple boolean, string. IF the boolean value is true, it means that
        the string contains the actual description. If false, it is an url or path to a file
        where the description is stored. In both cases, the string or the content of the file
        have to be HTML, ready to be set into the help display component.

        Returns None if there is no help file available.

        The default implementation looks for an rst file in a help folder under the folder
        where the algorithm is located.
        The name of the file is the name console name of the algorithm, without the namespace part
        """
        name = self.commandLineName().split(':')[1].lower()
        filename = os.path.join(
            os.path.dirname(inspect.getfile(self.__class__)), 'help',
            name + '.rst')
        try:
            html = getHtmlFromRstFile(filename)
            return True, html
        except:
            return False, None