Beispiel #1
0
    def __init__(self, pkgdir, pkg_xml):
        HtmlElement.__init__(self,
                             tag=html.Sections.article,
                             attrib={"class": "pkg-dep"})

        self._dep_lists = []

        p = HtmlElement(html.Grouping.p)
        p.text = 'List of first order '
        dep_href = HtmlElement(html.Text.a)
        dep_href.set("href", "http://wiki.ros.org/catkin/package.xml")
        dep_href.set("target", "_blank")
        dep_href.text = "package dependencies :"
        p.append(dep_href)

        ul = HtmlElement(html.Grouping.ul)

        for dep in pkg_xml.iter("build_depend"):
            li = HtmlElement(html.Grouping.li)
            li.text = dep.text
            self._dep_lists.append(dep.text)
            ul.append(li)

        p.append(ul)
        self.append(p)
Beispiel #2
0
    def __init__(self, pkgdir):
        HtmlElement.__init__(self,
                             tag=html.Sections.section,
                             attrib={"class": "package"})
        self._h2_index = 0
        self._dep_pkg = None
        pkg_xml = None
        # Load and read package.xml ressource
        pkg_xml_dir = pkgdir + '/package.xml'
        if os.access(pkg_xml_dir, os.R_OK):
            pkg_xml = html.loadHtml(pkg_xml_dir)
            self._read_pkg_xml(pkgdir, pkg_xml)
        else:
            html.HTMLException("Cannot found %s !" % pkg_xml_dir, self)

        # Load and read CMakeLists.txt ressource
        cmakelists_dir = pkgdir + '/CMakeLists.txt'
        if os.access(cmakelists_dir, os.R_OK):
            with open(cmakelists_dir) as fp:
                cmakelists = fp.read()
                self._read_cmakelists(pkgdir, cmakelists)
        else:
            html.HTMLException("Cannot found %s !" % cmakelists_dir, self)

        if pkg_xml is not None:
            self._read_agi_doc_xml(pkgdir, pkg_xml)
Beispiel #3
0
    def __init__(self, pkgdir, pkg_xml):
        HtmlElement.__init__(self, tag=html.Grouping.p)

        try:
            self.append(pkg_xml.find("./description"))
        except:
            try:
                self.text = pkg_xml.find("./description").text
            except:
                raise Exception(
                    "Connot found description tag into %s/package.xml" %
                    pkgdir)
Beispiel #4
0
    def __init__(self, name, href='#', subitem=True):
        HtmlElement.__init__(self, tag=html.Grouping.li)

        root = HtmlElement(tag=html.Text.a)
        root.set(html.Attrib.href, href)
        root.text = name
        self.append(root)

        self._container_menu = HtmlElement(tag=html.Grouping.ul)

        if subitem:
            self.append(self._container_menu)
Beispiel #5
0
 def __init__(self, pkgdir, pkg_xml):
     HtmlElement.__init__(self,
                          tag=html.Grouping.ul)
     
     version = HtmlElement(html.Grouping.li)
     version.text = "Version : %s"%pkg_xml.find("./version").text
     self.append(version)
     
     mtr = pkg_xml.find("./maintainer")
     
     maintainer_li = HtmlElement(html.Grouping.li)
     maintainer_li.text = "Maintainer : "
     maintainer = HtmlElement(html.Text.a)
     try:
         maintainer.set(html.Attrib.href, "mailto:%s"%mtr.attrib['email'])
     except:
         pass
     maintainer.text = mtr.text
     maintainer_li.append(maintainer)
     self.append(maintainer_li)
     
     llicense = HtmlElement(html.Grouping.li)
     llicense.text = "License : %s"%pkg_xml.find("./license").text
     self.append(llicense)
     
     if pkg_xml.find("./url") is not None:
         li = HtmlElement(html.Grouping.li)
         li.text = "Link : "
         url = HtmlElement(html.Text.a)
         url.set("href",pkg_xml.find("./url").text)
         url.set("target", "_blank")
         url.text  = pkg_xml.find("./url").text
         li.append(url)
         self.append(li)
         
     if pkg_xml.find("./export/rosdoc") is not None:
         li = HtmlElement(html.Grouping.li)
         li.text = "Sources : "
         doxygen = HtmlElement(html.Text.a)
         ref = pkgdir+"/doc/html/index.html"
         doxygen.set("href", ref)
         doxygen.set("target", "_blank")
         doxygen.text = "doxygen"
         li.append(doxygen)
         self.append(li)
Beispiel #6
0
 def __init__(self, packages_dir_list):
     HtmlElement.__init__(self,
                          tag=html.Sections.article,
                          attrib={"class":"ros_ws"})
     
     self.generate_ws_dot(packages_dir_list)
     
     a = HtmlElement(html.Text.a)
     a.set(html.Attrib.href,"../dot/agi_workspace.png")
     a.set("target", "_blank")
     
     p = HtmlElement(html.Grouping.p)
     p.set("align","center")
     
     img = HtmlElement(html.EmbeddedContent.img)
     img.set("src","../dot/agi_workspace.png")
     img.set("width","1024")
     img.set("height","150")
     
     p.append(img)
     
     a.append(p)
     
     self.append(a)
Beispiel #7
0
 def __init__(self):
     HtmlElement.__init__(self,
                          tag=html.Sections.article,
                          attrib={"class": "io-node"})
Beispiel #8
0
 def __init__(self):
     HtmlElement.__init__(self, tag=html.Grouping.p)
Beispiel #9
0
 def __init__(self):
     HtmlElement.__init__(self,
                          tag=html.Sections.article)
Beispiel #10
0
 def __init__(self):
     HtmlElement.__init__(self,
                          tag=html.Sections.article,
                          attrib={"class": "generation"})
Beispiel #11
0
 def __init__(self):
     HtmlElement.__init__(self,
                          tag=html.Sections.article,
                          attrib={"class": "parameters"})
Beispiel #12
0
 def __init__(self, menu_id):
     HtmlElement.__init__(self, tag=html.Grouping.div)
     self.set(html.Attrib.id, menu_id)
Beispiel #13
0
 def __init__(self):
     HtmlElement.__init__(self,
                          tag=html.Sections.section,
                          attrib={"class": "nodes"})