summaryrefslogtreecommitdiff
path: root/wiki/GMSL_Cameras_Open_Issues
diff options
context:
space:
mode:
Diffstat (limited to 'wiki/GMSL_Cameras_Open_Issues')
0 files changed, 0 insertions, 0 deletions
a id='n59' href='#n59'>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
#! /usr/bin/env python3
#===============================
#
# html_menu
#
# 2021/02/09 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
#===============================
import sys
import os
import datetime

import view
import html_base
from html_base import html
#====================================
#
# periject_html
#
#====================================
class periject_html(html_base.myhtml):

    #--------------------
    # menu_wiki
    #--------------------
    def menu_wiki(self):
        html("a", {"target":"_blank",
                   "href":"./wiki/top.html"}).print("Peri Peri Wiki")

    #--------------------
    # menu_folder
    #--------------------
    def menu_folder(self, current):
        folders	= self.runl("cd {}; ls -F | grep /".format(current))
        path	= current.replace("./projects", ".")
        link	= html("a", {"target":"summary",
                             "href":"{}/summary.html".format(path)})

        html("li").print(link.text(os.path.basename(current)))

        if (not folders):
            return

        with html("ul"):
            for folder in folders:
                dir = os.path.basename(folder)
                self.menu_folder("{}/{}".format(current, folder[:-1]))

    #--------------------
    # menu_assignee
    #--------------------
    def menu_assignee(self):
        # from project.schema.yaml
        with html("ul"):
            for assignee in ['BSP', 'Geert', 'Jacopo', 'Kaneko', 'Kieran', 'Laurent', 'Magnus', 'Marek',
                             'Morimoto', 'Niklas', 'Shimoda', 'Simon', 'Ulrich', 'Wolfram', "NoAssignee"]:
                html("li").print(html("a", {"target":"summary",
                                            "href":"./{}.html".format(assignee)}).text(assignee))

    #--------------------
    # menu_status
    #--------------------
    def menu_status(self):
        # from project.schema.yaml
        with html("ul"):
            for status in ['New', 'Active', 'Blocked', 'Paused', 'Done', 'Abandoned']:
                html("li").print(html("a", {"target":"summary",
                                            "href":"./{}.html".format(status)}).text(status))

    #--------------------
    # menu_team
    #--------------------
    def menu_team(self):
        # from project.schema.yaml
        with html("ul"):
            for status in ['Core', 'IO', 'MM']:
                html("li").print(html("a", {"target":"summary",
                                            "href":"./{}.html".format(status)}).text(status))

    #--------------------
    # menu_bsp
    #--------------------
    def menu_bsp(self, bsp):
        html("a", {"target":"summary",
                   "href":"./{}.html".format(bsp)}).print(bsp)

    #--------------------
    # print
    #--------------------
    def print(self, argv):

        # remove this script
        argv.pop(0)

        self.print_css("html")
        with html("body"):
            html("h1").print("Wiki")
            self.menu_wiki()

            html("h1").print("Schedule")
            html("a", {"target":"summary",
                       "href":"./schedule.html"}).print("schedule")

            html("h1").print("Folder")
            with html("ul"):
                self.menu_folder("./projects")

            html("h1").print("Assignee")
            self.menu_assignee()

            html("h1").print("Status")
            self.menu_status()

            html("h1").print("Team")
            self.menu_team()

            html("h1").print("BSP")
            with html("ul"):
                for bsp in argv:
                    with html("li"):
                        self.menu_bsp(bsp)

            html("div").print("<br><br>update<br>{}".format(
                datetime.datetime.now().strftime("%Y/%m/%d %H:%M")))

#====================================
#
# As command
#
#====================================