stage3-bg1

  • Home
    • Site Map
    • reveal
    • blog
  • About
  • 小組作業
    • W9 統整各組資料
    • W10 stage3討論
      • ipv4操作
      • task1測試
    • W11 OBS使用教學
    • W12 上課直播
    • W13 Gitlab建立
      • gitlab-ssh
    • W14 robotDK測試
    • W15 影片翻譯
    • W16 取分項目
  • Gogs建立教學
    • fossil
  • TASK2測試區
    • 整體生產線
    • 掃地機器人
    • 分球機
    • 堆高機
    • 夾爪機構
    • 遊樂設施
  • 小組影片
  • 直播影片
ipv4操作 << Previous Next >> W11 OBS使用教學

task1測試

40823245編輯

stage3-2b.txt

使用程式跑出stage3的小組、組長、組員超連結,我參考老師的程式修改後成功執行,但過程有遇到很多問題,就上網找資料和查程式語法,下面2張圖簡單講大概意思,網路上找到的都很清楚(下面附參考網址)。

程式碼

def stu2b(account):
    if account == "40823231":
        return account + "-2"
    elif account[0:3] == "407":
        return "s" + account
    else:
        return account

teamb = []

# open file, default is read mode, since txt content no chinese char
# no encoding = "UTF-8" is needed
with open("stage3_2b.txt") as fh:
    # readlines will read into the whole line and put into list format
    # has \n at the end of each line
    data = fh.readlines()
#print(len(data))
for i in range(len(data)):
    group = data[i].rstrip("\n").split("\t")
    teamb.append(group)
    
output = ""    
seperator = "-"*10 + "<br />"

for i in teamb[0:]:
    team = i[0]
    leader = stu2b(i[1])
    m1 = stu2b(i[3])
    m2 = stu2b(i[5])
    m3 = stu2b(i[7])
    m4 = stu2b(i[9])
    m5 = stu2b(i[11])
    m6 = stu2b(i[13])
    
    try:
        m7 = stu2b(i[15])
    except:
        m7 = ""
    try:
        m8 = stu2b(i[17])
    except:
        m8 = ""
        
    leaderrepo = "<a href='http://github.com/" + leader + "/cd2021'>" + leader + " repo</a>"
    leadersite = "<a href='http://" + leader + ".github.io/cd2021'>" + leader +  " site</a>"
    m1repo = "<a href='http://github.com/" + m1 + "/cd2021'>" + m1 + " repo</a>"
    m1site = "<a href='http://" + m1 + ".github.io/cd2021'>" + m1 +  " site</a>"
    m2repo = "<a href='http://github.com/" + m2 + "/cd2021'>" + m2 + " repo</a>"
    m2site = "<a href='http://" + m2 + ".github.io/cd2021'>" + m2 +  " site</a>"
    m3repo = "<a href='http://github.com/" + m3 + "/cd2021'>" + m3 + " repo</a>"
    m3site = "<a href='http://" + m3 + ".github.io/cd2021'>" + m3 +  " site</a>"
    m4repo = "<a href='http://github.com/" + m4 + "/cd2021'>" + m4 + " repo</a>"
    m4site = "<a href='http://" + m4 + ".github.io/cd2021'>" + m4 +  " site</a>"
    m5repo = "<a href='http://github.com/" + m5 + "/cd2021'>" + m5 + " repo</a>"
    m5site = "<a href='http://" + m5 + ".github.io/cd2021'>" + m5 +  " site</a>"
    m6repo = "<a href='http://github.com/" + m6 + "/cd2021'>" + m6 + " repo</a>"
    m6site = "<a href='http://" + m6 + ".github.io/cd2021'>" + m6 +  " site</a>"
 

    teamrepo = "<a href='http://github.com/" + leader + "/" + team + "'>" + team + " repo</a>"
    teamsite =  "<a href='http://" + m1 + ".github.io/" + team + "'>" + team +  " site</a>"

    output += teamrepo + " | " + teamsite + " | " +leaderrepo + " | " + leadersite + " | " +m1repo + " | " + m1site + " | " +m2repo + " | " + m2site + " | " +m3repo + " | " + m3site + " | " +m4repo + " | " + m4site + " | " +m5repo + " | " + m5site + " | " +m6repo + " | " + m6site 
    
    if m7 != "":
       m7repo = "<a href='http://github.com/" + m7 + "/cd2021'>" + m7 + " repo</a>"
       m7site = "<a href='http://" + m7 + ".github.io/cd2021'>" + m7 +  " site</a>"   
       output += " |  " + m7repo + "| " + m7site
    else:
        output += "" 
    
    if m8 != "":
       m8repo = "<a href='http://github.com/" + m8 + "/cd2021'>" + m8 + " repo</a>"
       m8site = "<a href='http://" + m8 + ".github.io/cd2021'>" + m8 +  " site</a>"   
       output += " |  " + m8repo + "| " + m8site + "<br />" + seperator
    else:
        output += "<br />" + seperator


print(output)
# the following will use group data to generate needed html

參考資料

運算符號、運算符號-1、讀檔、for迴圈、for迴圈(範圍)、列表、切割字串、異常處理

遇到問題

列表超出範圍(list index out of range),當時一直以為是沒有定義特殊情況,但之後發現是最後沒有設定好7、8、9人的特殊情況。

跑程式的影片

把白窗裡的輸出複製放入網頁

結果如下:

stage3-bg1 repo | stage3-bg1 site | 40823245 repo | 40823245 site | 40823251 repo | 40823251 site | 40823208 repo | 40823208 site | 40823213 repo | 40823213 site | 40823232 repo | 40823232 site | 40823234 repo | 40823234 site | 40823235 repo | 40823235 site | 40823246 repo| 40823246 site
----------
stage3-bg2 repo | stage3-bg2 site | 40823217 repo | 40823217 site | 40823201 repo | 40823201 site | 40823209 repo | 40823209 site | 40823210 repo | 40823210 site | 40823206 repo | 40823206 site | 40823207 repo | 40823207 site | 40823223 repo | 40823223 site | 40823224 repo| 40823224 site
----------
stage3-bg3 repo | stage3-bg3 site | 40823236 repo | 40823236 site | 40823202 repo | 40823202 site | 40823203 repo | 40823203 site | 40823212 repo | 40823212 site | 40823219 repo | 40823219 site | 40823222 repo | 40823222 site | 40823231-2 repo | 40823231-2 site | 40823244 repo| 40823244 site
----------
stage3-bg4 repo | stage3-bg4 site | 40823239 repo | 40823239 site | s40723140 repo | s40723140 site | s40723128 repo | s40723128 site | s40723139 repo | s40723139 site | s40723106 repo | s40723106 site | s40723135 repo | s40723135 site | s40723143 repo | s40723143 site | s40723215 repo| s40723215 site
----------
stage3-bg5 repo | stage3-bg5 site | 40823221 repo | 40823221 site | 40823204 repo | 40823204 site | 40823205 repo | 40823205 site | 40823220 repo | 40823220 site | 40823228 repo | 40823228 site | 40823237 repo | 40823237 site | 40823242 repo | 40823242 site | 40823250 repo| 40823250 site | 40832244 repo| 40832244 site
----------
stage3-bg6 repo | stage3-bg6 site | 40823225 repo | 40823225 site | 40823214 repo | 40823214 site | 40823218 repo | 40823218 site | 40823211 repo | 40823211 site | 40823248 repo | 40823248 site | 40823247 repo | 40823247 site | 40823216 repo | 40823216 site | 40823238 repo| 40823238 site
----------
stage3-bg7 repo | stage3-bg7 site | 40623144 repo | 40623144 site | 40823233 repo | 40823233 site | s40723224 repo | s40723224 site | 40823241 repo | 40823241 site | 40423155 repo | 40423155 site | 40823227 repo | 40823227 site | s40723233 repo | s40723233 site
----------

0516更新

新增每位組員的小組倉儲和網頁連結

程式碼

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
def stu2b(account):
    if account == "40823231":
        return account + "-2"
    elif account[0:3] == "407":
        return "s" + account
    else:
        return account
 
teamb = []
 
# open file, default is read mode, since txt content no chinese char
# no encoding = "UTF-8" is needed
with open("stage3_2b.txt") as fh:
    # readlines will read into the whole line and put into list format
    # has \n at the end of each line
    data = fh.readlines()
#print(len(data))
for i in range(len(data)):
    group = data[i].rstrip("\n").split("\t")
    teamb.append(group)
     
output = ""   
seperator = "-"*10 + "<br />"
 
for i in teamb[0:]:
    team = i[0]
    leader = stu2b(i[1])
    m1 = stu2b(i[3])
    m2 = stu2b(i[5])
    m3 = stu2b(i[7])
    m4 = stu2b(i[9])
    m5 = stu2b(i[11])
    m6 = stu2b(i[13])
     
    try:
        m7 = stu2b(i[15])
    except:
        m7 = ""
    try:
        m8 = stu2b(i[17])
    except:
        m8 = ""
         
    leaderrepo = "<a href='http://github.com/" + leader + "/cd2021'>" + leader + " repo</a>"
    leadersite = "<a href='http://" + leader + ".github.io/cd2021'>" + leader +  " site</a>"
    m1repo = "<a href='http://github.com/" + m1 + "/cd2021'>" + m1 + " repo</a>"
    m1site = "<a href='http://" + m1 + ".github.io/cd2021'>" + m1 +  " site</a>"
    m2repo = "<a href='http://github.com/" + m2 + "/cd2021'>" + m2 + " repo</a>"
    m2site = "<a href='http://" + m2 + ".github.io/cd2021'>" + m2 +  " site</a>"
    m3repo = "<a href='http://github.com/" + m3 + "/cd2021'>" + m3 + " repo</a>"
    m3site = "<a href='http://" + m3 + ".github.io/cd2021'>" + m3 +  " site</a>"
    m4repo = "<a href='http://github.com/" + m4 + "/cd2021'>" + m4 + " repo</a>"
    m4site = "<a href='http://" + m4 + ".github.io/cd2021'>" + m4 +  " site</a>"
    m5repo = "<a href='http://github.com/" + m5 + "/cd2021'>" + m5 + " repo</a>"
    m5site = "<a href='http://" + m5 + ".github.io/cd2021'>" + m5 +  " site</a>"
    m6repo = "<a href='http://github.com/" + m6 + "/cd2021'>" + m6 + " repo</a>"
    m6site = "<a href='http://" + m6 + ".github.io/cd2021'>" + m6 +  " site</a>"
  
 
    leaderteamrepo = "<a href='http://github.com/" + leader + "/" + team + "'>" + team + " repo</a>"
    leaderteamsite =  "<a href='http://" + leader + ".github.io/" + team + "'>" + team +  " site</a>"
    m1teamrepo = "<a href='http://github.com/" + m1 + "/" + team + "'>" + team + " repo</a>"
    m1teamsite = "<a href='http://" + m1 + ".github.io/" + team + "'>" + team +  " site</a>"
    m2teamrepo = "<a href='http://github.com/" + m2 + "/" + team + "'>" + team + " repo</a>"
    m2teamsite = "<a href='http://" + m2 + ".github.io/" + team + "'>" + team +  " site</a>"
    m3teamrepo = "<a href='http://github.com/" + m3 + "/" + team + "'>" + team + " repo</a>"
    m3teamsite = "<a href='http://" + m3 + ".github.io/" + team + "'>" + team +  " site</a>"
    m4teamrepo = "<a href='http://github.com/" + m4 + "/" + team + "'>" + team + " repo</a>"
    m4teamsite = "<a href='http://" + m4 + ".github.io/" + team + "'>" + team +  " site</a>"
    m5teamrepo = "<a href='http://github.com/" + m5 + "/" + team + "'>" + team + " repo</a>"
    m5teamsite = "<a href='http://" + m5 + ".github.io/" + team + "'>" + team +  " site</a>"
    m6teamrepo = "<a href='http://github.com/" + m6 + "/" + team + "'>" + team + " repo</a>"
    m6teamsite = "<a href='http://" + m6 + ".github.io/" + team + "'>" + team +  " site</a>"
 
    output += leaderrepo + " | " + leadersite + " | " +leaderteamrepo + " | " + leaderteamsite + " | " +m1repo + " | " + m1site + " | " +  m1teamrepo + " | " + m1teamsite + " | " +m2repo + " | " + m2site +  " | "  + m2teamrepo + " | " + m2teamsite + " | " +m3repo + " | " + m3site + " | "  + m3teamrepo + " | " + m3teamsite + " | " +m4repo + " | " + m4site + " | "  + m4teamrepo + " | " + m4teamsite + " | " +m5repo + " | " + m5site + " | "  + m5teamrepo + " | " + m5teamsite + " | " +m6repo + " | " + m6site + " | "  + m6teamrepo + " | " + m6teamsite
     
    if m7 != "":
       m7repo = "<a href='http://github.com/" + m7 + "/cd2021'>" + m7 + " repo</a>"
       m7site = "<a href='http://" + m7 + ".github.io/cd2021'>" + m7 +  " site</a>"  
       m7teamrepo = "<a href='http://github.com/" + m7 + "/" + team + "'>" + team + " repo</a>"
       m7teamsite = "<a href='http://" + m7 + ".github.io/" + team + "'>" + team +  " site</a>"
       output += " |  " + m7repo + "| " + m7site +  " | "  + m7teamrepo + " | " + m7teamsite
    else:
        output += ""
     
    if m8 != "":
       m8repo = "<a href='http://github.com/" + m8 + "/cd2021'>" + m8 + " repo</a>"
       m8site = "<a href='http://" + m8 + ".github.io/cd2021'>" + m8 +  " site</a>"  
       m8teamrepo = "<a href='http://github.com/" + m8 + "/" + team + "'>" + team + " repo</a>"
       m8teamsite = "<a href='http://" + m8 + ".github.io/" + team + "'>" + team +  " site</a>"
       output += " |  " + m8repo + "| " + m8site +  " | "  + m8teamrepo + " | " + m8teamsite + "<br />" + seperator
    else:
        output += "<br />" + seperator
 
 
print(output)
# the following will use group data to generate needed html

跑程式的影片

結果如下

40823245 repo | 40823245 site | stage3-bg1 repo | stage3-bg1 site | 40823251 repo | 40823251 site | stage3-bg1 repo | stage3-bg1 site | 40823208 repo | 40823208 site | stage3-bg1 repo | stage3-bg1 site | 40823213 repo | 40823213 site | stage3-bg1 repo | stage3-bg1 site | 40823232 repo | 40823232 site | stage3-bg1 repo | stage3-bg1 site | 40823234 repo | 40823234 site | stage3-bg1 repo | stage3-bg1 site | 40823235 repo | 40823235 site | stage3-bg1 repo | stage3-bg1 site | 40823246 repo| 40823246 site | stage3-bg1 repo | stage3-bg1 site
----------
40823217 repo | 40823217 site | stage3-bg2 repo | stage3-bg2 site | 40823201 repo | 40823201 site | stage3-bg2 repo | stage3-bg2 site | 40823209 repo | 40823209 site | stage3-bg2 repo | stage3-bg2 site | 40823210 repo | 40823210 site | stage3-bg2 repo | stage3-bg2 site | 40823206 repo | 40823206 site | stage3-bg2 repo | stage3-bg2 site | 40823207 repo | 40823207 site | stage3-bg2 repo | stage3-bg2 site | 40823223 repo | 40823223 site | stage3-bg2 repo | stage3-bg2 site | 40823224 repo| 40823224 site | stage3-bg2 repo | stage3-bg2 site
----------
40823236 repo | 40823236 site | stage3-bg3 repo | stage3-bg3 site | 40823202 repo | 40823202 site | stage3-bg3 repo | stage3-bg3 site | 40823203 repo | 40823203 site | stage3-bg3 repo | stage3-bg3 site | 40823212 repo | 40823212 site | stage3-bg3 repo | stage3-bg3 site | 40823219 repo | 40823219 site | stage3-bg3 repo | stage3-bg3 site | 40823222 repo | 40823222 site | stage3-bg3 repo | stage3-bg3 site | 40823231-2 repo | 40823231-2 site | stage3-bg3 repo | stage3-bg3 site | 40823244 repo| 40823244 site | stage3-bg3 repo | stage3-bg3 site
----------
40823239 repo | 40823239 site | stage3-bg4 repo | stage3-bg4 site | s40723140 repo | s40723140 site | stage3-bg4 repo | stage3-bg4 site | s40723128 repo | s40723128 site | stage3-bg4 repo | stage3-bg4 site | s40723139 repo | s40723139 site | stage3-bg4 repo | stage3-bg4 site | s40723106 repo | s40723106 site | stage3-bg4 repo | stage3-bg4 site | s40723135 repo | s40723135 site | stage3-bg4 repo | stage3-bg4 site | s40723143 repo | s40723143 site | stage3-bg4 repo | stage3-bg4 site | s40723215 repo| s40723215 site | stage3-bg4 repo | stage3-bg4 site
----------
40823221 repo | 40823221 site | stage3-bg5 repo | stage3-bg5 site | 40823204 repo | 40823204 site | stage3-bg5 repo | stage3-bg5 site | 40823205 repo | 40823205 site | stage3-bg5 repo | stage3-bg5 site | 40823220 repo | 40823220 site | stage3-bg5 repo | stage3-bg5 site | 40823228 repo | 40823228 site | stage3-bg5 repo | stage3-bg5 site | 40823237 repo | 40823237 site | stage3-bg5 repo | stage3-bg5 site | 40823242 repo | 40823242 site | stage3-bg5 repo | stage3-bg5 site | 40823250 repo| 40823250 site | stage3-bg5 repo | stage3-bg5 site | 40832244 repo| 40832244 site | stage3-bg5 repo | stage3-bg5 site
----------
40823225 repo | 40823225 site | stage3-bg6 repo | stage3-bg6 site | 40823214 repo | 40823214 site | stage3-bg6 repo | stage3-bg6 site | 40823218 repo | 40823218 site | stage3-bg6 repo | stage3-bg6 site | 40823211 repo | 40823211 site | stage3-bg6 repo | stage3-bg6 site | 40823248 repo | 40823248 site | stage3-bg6 repo | stage3-bg6 site | 40823247 repo | 40823247 site | stage3-bg6 repo | stage3-bg6 site | 40823216 repo | 40823216 site | stage3-bg6 repo | stage3-bg6 site | 40823238 repo| 40823238 site | stage3-bg6 repo | stage3-bg6 site
----------
40623144 repo | 40623144 site | stage3-bg7 repo | stage3-bg7 site | 40823233 repo | 40823233 site | stage3-bg7 repo | stage3-bg7 site | s40723224 repo | s40723224 site | stage3-bg7 repo | stage3-bg7 site | 40823241 repo | 40823241 site | stage3-bg7 repo | stage3-bg7 site | 40423155 repo | 40423155 site | stage3-bg7 repo | stage3-bg7 site | 40823227 repo | 40823227 site | stage3-bg7 repo | stage3-bg7 site | s40723233 repo | s40723233 site | stage3-bg7 repo | stage3-bg7 site
----------

0526更新

每個組員換行顯示(使用<br />)

程式碼

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
def stu2b(account):
    if account == "40823231":
        return account + "-2"
    elif account[0:3] == "407":
        return "s" + account
    else:
        return account
 
teamb = []
 
# open file, default is read mode, since txt content no chinese char
# no encoding = "UTF-8" is needed
with open("stage3_2b.txt") as fh:
    # readlines will read into the whole line and put into list format
    # has \n at the end of each line
    data = fh.readlines()
#print(len(data))
for i in range(len(data)):
    group = data[i].rstrip("\n").split("\t")
    teamb.append(group)
     
output = ""   
seperator = "-"*10 + "<br />"
 
for i in teamb[0:]:
    team = i[0]
    leader = stu2b(i[1])
    m1 = stu2b(i[3])
    m2 = stu2b(i[5])
    m3 = stu2b(i[7])
    m4 = stu2b(i[9])
    m5 = stu2b(i[11])
    m6 = stu2b(i[13])
     
    try:
        m7 = stu2b(i[15])
    except:
        m7 = ""
    try:
        m8 = stu2b(i[17])
    except:
        m8 = ""
         
    leaderrepo = "<a href='http://github.com/" + leader + "/cd2021'>" + leader + " repo</a>"
    leadersite = "<a href='http://" + leader + ".github.io/cd2021'>" + leader +  " site</a>"
    m1repo = "<a href='http://github.com/" + m1 + "/cd2021'>" + m1 + " repo</a>"
    m1site = "<a href='http://" + m1 + ".github.io/cd2021'>" + m1 +  " site</a>"
    m2repo = "<a href='http://github.com/" + m2 + "/cd2021'>" + m2 + " repo</a>"
    m2site = "<a href='http://" + m2 + ".github.io/cd2021'>" + m2 +  " site</a>"
    m3repo = "<a href='http://github.com/" + m3 + "/cd2021'>" + m3 + " repo</a>"
    m3site = "<a href='http://" + m3 + ".github.io/cd2021'>" + m3 +  " site</a>"
    m4repo = "<a href='http://github.com/" + m4 + "/cd2021'>" + m4 + " repo</a>"
    m4site = "<a href='http://" + m4 + ".github.io/cd2021'>" + m4 +  " site</a>"
    m5repo = "<a href='http://github.com/" + m5 + "/cd2021'>" + m5 + " repo</a>"
    m5site = "<a href='http://" + m5 + ".github.io/cd2021'>" + m5 +  " site</a>"
    m6repo = "<a href='http://github.com/" + m6 + "/cd2021'>" + m6 + " repo</a>"
    m6site = "<a href='http://" + m6 + ".github.io/cd2021'>" + m6 +  " site</a>"
  
 
    leaderteamrepo = "<a href='http://github.com/" + leader + "/" + team + "'>" + team + " repo</a>"
    leaderteamsite =  "<a href='http://" + leader + ".github.io/" + team + "'>" + team +  " site</a>"
    m1teamrepo = "<a href='http://github.com/" + m1 + "/" + team + "'>" + team + " repo</a>"
    m1teamsite = "<a href='http://" + m1 + ".github.io/" + team + "'>" + team +  " site</a>"
    m2teamrepo = "<a href='http://github.com/" + m2 + "/" + team + "'>" + team + " repo</a>"
    m2teamsite = "<a href='http://" + m2 + ".github.io/" + team + "'>" + team +  " site</a>"
    m3teamrepo = "<a href='http://github.com/" + m3 + "/" + team + "'>" + team + " repo</a>"
    m3teamsite = "<a href='http://" + m3 + ".github.io/" + team + "'>" + team +  " site</a>"
    m4teamrepo = "<a href='http://github.com/" + m4 + "/" + team + "'>" + team + " repo</a>"
    m4teamsite = "<a href='http://" + m4 + ".github.io/" + team + "'>" + team +  " site</a>"
    m5teamrepo = "<a href='http://github.com/" + m5 + "/" + team + "'>" + team + " repo</a>"
    m5teamsite = "<a href='http://" + m5 + ".github.io/" + team + "'>" + team +  " site</a>"
    m6teamrepo = "<a href='http://github.com/" + m6 + "/" + team + "'>" + team + " repo</a>"
    m6teamsite = "<a href='http://" + m6 + ".github.io/" + team + "'>" + team +  " site</a>"
 
    output += leaderrepo + " | " + leadersite + " | " +leaderteamrepo + " | " + leaderteamsite + "<br />" +m1repo + " | " + m1site + " | " +  m1teamrepo + " | " + m1teamsite + "<br />" +m2repo + " | " + m2site +  " | "  + m2teamrepo + " | " + m2teamsite + "<br />" +m3repo + " | " + m3site + " | "  + m3teamrepo + " | " + m3teamsite + "<br />" +m4repo + " | " + m4site + " | "  + m4teamrepo + " | " + m4teamsite +"<br />" +m5repo + " | " + m5site + " | "  + m5teamrepo + " | " + m5teamsite + "<br />" +m6repo + " | " + m6site + " | "  + m6teamrepo + " | " + m6teamsite + "<br />"
     
    if m7 != "":
       m7repo = "<a href='http://github.com/" + m7 + "/cd2021'>" + m7 + " repo</a>"
       m7site = "<a href='http://" + m7 + ".github.io/cd2021'>" + m7 +  " site</a>"  
       m7teamrepo = "<a href='http://github.com/" + m7 + "/" + team + "'>" + team + " repo</a>"
       m7teamsite = "<a href='http://" + m7 + ".github.io/" + team + "'>" + team +  " site</a>"
       output += m7repo + "| " + m7site +  " | "  + m7teamrepo + " | " + m7teamsite + "<br />"
    else:
        output += ""
     
    if m8 != "":
       m8repo = "<a href='http://github.com/" + m8 + "/cd2021'>" + m8 + " repo</a>"
       m8site = "<a href='http://" + m8 + ".github.io/cd2021'>" + m8 +  " site</a>"  
       m8teamrepo = "<a href='http://github.com/" + m8 + "/" + team + "'>" + team + " repo</a>"
       m8teamsite = "<a href='http://" + m8 + ".github.io/" + team + "'>" + team +  " site</a>"
       output += m8repo + "| " + m8site +  " | "  + m8teamrepo + " | " + m8teamsite + "<br />" + seperator
    else:
        output += "<br />" + seperator
 
 
print(output)
# the following will use group data to generate needed html

跑程式

結果

40823245 repo | 40823245 site | stage3-bg1 repo | stage3-bg1 site
40823251 repo | 40823251 site | stage3-bg1 repo | stage3-bg1 site
40823208 repo | 40823208 site | stage3-bg1 repo | stage3-bg1 site
40823213 repo | 40823213 site | stage3-bg1 repo | stage3-bg1 site
40823232 repo | 40823232 site | stage3-bg1 repo | stage3-bg1 site
40823234 repo | 40823234 site | stage3-bg1 repo | stage3-bg1 site
40823235 repo | 40823235 site | stage3-bg1 repo | stage3-bg1 site
40823246 repo| 40823246 site | stage3-bg1 repo | stage3-bg1 site

----------
40823217 repo | 40823217 site | stage3-bg2 repo | stage3-bg2 site
40823201 repo | 40823201 site | stage3-bg2 repo | stage3-bg2 site
40823209 repo | 40823209 site | stage3-bg2 repo | stage3-bg2 site
40823210 repo | 40823210 site | stage3-bg2 repo | stage3-bg2 site
40823206 repo | 40823206 site | stage3-bg2 repo | stage3-bg2 site
40823207 repo | 40823207 site | stage3-bg2 repo | stage3-bg2 site
40823223 repo | 40823223 site | stage3-bg2 repo | stage3-bg2 site
40823224 repo| 40823224 site | stage3-bg2 repo | stage3-bg2 site

----------
40823236 repo | 40823236 site | stage3-bg3 repo | stage3-bg3 site
40823202 repo | 40823202 site | stage3-bg3 repo | stage3-bg3 site
40823203 repo | 40823203 site | stage3-bg3 repo | stage3-bg3 site
40823212 repo | 40823212 site | stage3-bg3 repo | stage3-bg3 site
40823219 repo | 40823219 site | stage3-bg3 repo | stage3-bg3 site
40823222 repo | 40823222 site | stage3-bg3 repo | stage3-bg3 site
40823231-2 repo | 40823231-2 site | stage3-bg3 repo | stage3-bg3 site
40823244 repo| 40823244 site | stage3-bg3 repo | stage3-bg3 site

----------
40823239 repo | 40823239 site | stage3-bg4 repo | stage3-bg4 site
s40723140 repo | s40723140 site | stage3-bg4 repo | stage3-bg4 site
s40723128 repo | s40723128 site | stage3-bg4 repo | stage3-bg4 site
s40723139 repo | s40723139 site | stage3-bg4 repo | stage3-bg4 site
s40723106 repo | s40723106 site | stage3-bg4 repo | stage3-bg4 site
s40723135 repo | s40723135 site | stage3-bg4 repo | stage3-bg4 site
s40723143 repo | s40723143 site | stage3-bg4 repo | stage3-bg4 site
s40723215 repo| s40723215 site | stage3-bg4 repo | stage3-bg4 site

----------
40823221 repo | 40823221 site | stage3-bg5 repo | stage3-bg5 site
40823204 repo | 40823204 site | stage3-bg5 repo | stage3-bg5 site
40823205 repo | 40823205 site | stage3-bg5 repo | stage3-bg5 site
40823220 repo | 40823220 site | stage3-bg5 repo | stage3-bg5 site
40823228 repo | 40823228 site | stage3-bg5 repo | stage3-bg5 site
40823237 repo | 40823237 site | stage3-bg5 repo | stage3-bg5 site
40823242 repo | 40823242 site | stage3-bg5 repo | stage3-bg5 site
40823250 repo| 40823250 site | stage3-bg5 repo | stage3-bg5 site
40832244 repo| 40832244 site | stage3-bg5 repo | stage3-bg5 site
----------
40823225 repo | 40823225 site | stage3-bg6 repo | stage3-bg6 site
40823214 repo | 40823214 site | stage3-bg6 repo | stage3-bg6 site
40823218 repo | 40823218 site | stage3-bg6 repo | stage3-bg6 site
40823211 repo | 40823211 site | stage3-bg6 repo | stage3-bg6 site
40823248 repo | 40823248 site | stage3-bg6 repo | stage3-bg6 site
40823247 repo | 40823247 site | stage3-bg6 repo | stage3-bg6 site
40823216 repo | 40823216 site | stage3-bg6 repo | stage3-bg6 site
40823238 repo| 40823238 site | stage3-bg6 repo | stage3-bg6 site

----------
40623144 repo | 40623144 site | stage3-bg7 repo | stage3-bg7 site
40823233 repo | 40823233 site | stage3-bg7 repo | stage3-bg7 site
s40723224 repo | s40723224 site | stage3-bg7 repo | stage3-bg7 site
40823241 repo | 40823241 site | stage3-bg7 repo | stage3-bg7 site
40423155 repo | 40423155 site | stage3-bg7 repo | stage3-bg7 site
40823227 repo | 40823227 site | stage3-bg7 repo | stage3-bg7 site
s40723233 repo | s40723233 site | stage3-bg7 repo | stage3-bg7 site

----------


ipv4操作 << Previous Next >> W11 OBS使用教學

Copyright © All rights reserved | This template is made with by Colorlib