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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
'''
Created on Dec 10, 2015
@author: deepa
'''
def save_html(): # (outObj, uiObj, dictBeamData, dictColData)
fileName = '/home/deepa/finPlateReport.html'
f = open(fileName,'w')
f.write(t('html'))
f.write(t('head'))
f.write(t('''link rel="stylesheet" type="text/css" href="mystyle.css"'''))
f.write(t('/head'))
f.write(t('body'))
f.write(t('img src="Osdag.png" align = "middle" style="width:100px;height:100px;"'))
f.write(t('img src="Osdagextd.png" align = "down" style="width:100px;height:35px;"'))
# data = [
# [0, "Project Summary", ""],
# [1, "Project Title", "XXX"],
# [1, "Company", "XXX"],
# [1, "Designer", "XXX"],
# [0, "finplate", ""],
# [1, "Connection", ""],
# [2, "Connection Type", "Shear Connection"],
# [2, "Connectivity", "Column Flange Beam Web"],
# [2, "Beam Connection", "Bolted and Welded"],
# [1, "Load(Factored Load)", ""],
# [2, "Shear Force(kH)", "140"],
# [1, "Components", ""],
# [2, "Column Section", "ISSC200"],
# [3, "Steel Grade", "410"],
# [3, "Steel Type", "250"],
# [2, "Beam Section", "ISMB 400"],
# [2, "Plate Section", ""],
# [3, "Thickness", "xx"],
# [3, "Width", "xx"],
# [3, "Depth", "xx"],
# ]
#---------------------
rstr = t('table')
rstr += t('''col width=70%''')
rstr += t('''col width=30%''')
row = [0,' ', '']
rstr += t('tr')
rstr += t('td img src="Osdag.png" alt="Mountain View"align = "middle" style="width:100px;height:100px;') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
rstr = t('table')
rstr = t('table')
rstr += t('''col width=70%''')
rstr += t('''col width=30%''')
# row = [0,' ', '']
# rstr += t('tr')
# rstr += t('td img src="Osdag.png" alt="Mountain View"align = "middle" style="width:100px;height:100px;') + space(row[0]) + row[1] + t('/td')
# rstr += t('/tr')
row = [0, 'Project Summary', ' ']
rstr += t('tr')
rstr += t('td colspan="2" class="header0"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [1, "Project Title", "FinPlate Connection"]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header1"') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Company", "Osdag"]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header1"') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Designer", "Hashmi"]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header1"') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Job Number", "test_1"]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header1"') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Design Code/Method", "IS800:2007/Limit state design"]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header1"') + row[2] + t('/td')
rstr += t('/tr')
row = [0, "Design Conclusion", "IS800:2007/Limit state design"]
rstr += t('tr')
rstr += t('td colspan="2" class="header0"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [1, "Finplate", "Pass"]
rstr += t('tr')
rstr += t('td class="header1 "') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header1 safe"') + row[2] + t('/td')
rstr += t('/tr')
row = [0, "Finplate", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header0"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [0, "Connection Properties", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1_1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [0, "Connection ", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [1, "Connection Title", " Single Finplate"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Connection Type", "Shear Connection"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [0, "Connection Category ", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [1, "Beam Connection", "Bolted and Welded"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Connectivity", "Column Flange Beam Web"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [0, "Loading (Factored Load) ", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [1, "Shear Force (kN)", "140"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [0, "Components ", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [1, "Column Section", "ISSC 200"]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Material", "Fe250"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Beam Section", "ISMB 400"]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Material", "Fe250"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Hole", "STD"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Plate Section ", "PLT 300X10X100 "]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Thickness (mm)", "10"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Width (mm)", "10"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Depth (mm)", "300"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Hole", "STD"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Weld ", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [2, "Type", "Double Fillet"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Size (mm)", "6"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [1, "Bolts ", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [2, "Type", "HSFG"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Grade", "8.8"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Diameter (mm)", "20"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Bolt Numbers", "3"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Columns (Vertical Lines)", "1 "]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Bolts Per Column", "3"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Gauge (mm)", "0"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Pitch (mm)", "100"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "End Distance (mm)", "50"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2"') + row[2] + t('/td')
rstr += t('/tr')
row = [2, "Edge Distance (mm)", "50"]
rstr += t('tr')
rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
row = [0, "Assembly ", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
row = [1, "Column-Beam Clearance (mm)", "20"]
rstr += t('tr')
rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
rstr += t('td class="header2 "') + row[2] + t('/td')
rstr += t('/tr')
rstr += t('/table')
rstr += t('table')
row = [0, "3D View", " "]
rstr += t('tr')
rstr += t('td colspan="2" class="header1_1"') + space(row[0]) + row[1] + t('/td')
rstr += t('/tr')
rstr += t('/table')
f.write(rstr)
f.write(t('/body'))
f.write(t('/html'))
f.close()
def space(n):
rstr = " " * 4 * n
return rstr
def t(n):
return '<' + n + '>'
def quote(m):
return '"' + m + '"'
if __name__ == '__main__':
save_html()
print "hiiiiii"
|