Skip to content

Commit

Permalink
fix : HTML_Input_Table function modified #144
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Mar 21, 2021
1 parent e025ace commit 15877ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
18 changes: 2 additions & 16 deletions opem/Functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import datetime
from art import text2art
import opem.Script
from opem.Params import Version, Website, UpdateUrl, Warning_Message_1, Warning_Message_2, HTML_Init_Template, HTML_Input_Table_Template1
from opem.Params import Version, Website, UpdateUrl, Warning_Message_1, Warning_Message_2, HTML_Init_Template, HTML_Input_Table_Template1, HTML_Input_Table_Template2
import io
import os
import requests
Expand Down Expand Up @@ -452,21 +452,7 @@ def HTML_Input_Table(Input_Dict, Input_Params, file):
file.write(HTML_Input_Table_Template1)
Input_Params_Keys = sorted(Input_Params.keys())
for key in Input_Params_Keys:
file.write(
'<tr align="center" style="border:1px solid black;border-collapse: collapse;">\n')
file.write(
'<td style="border:1px solid black;padding:4px;border-collapse: collapse;">\n' +
key +
"\n</td>\n")
file.write(
'<td style="border:1px solid black;padding:4px;border-collapse: collapse;">\n' +
Input_Params[key] +
"\n</td>\n")
file.write(
'<td style="border:1px solid black;padding:4px;border-collapse: collapse;">\n' +
str(
Input_Dict[key]) +
"\n</td>\n")
file.write(HTML_Input_Table_Template2.format(key, Input_Params[key], str(Input_Dict[key])))
file.write("</table>\n")


Expand Down
7 changes: 7 additions & 0 deletions opem/Params.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@
</tr>
"""

HTML_Input_Table_Template2 = """
<tr align="center" style="border:1px solid black;border-collapse: collapse;">
<td style="border:1px solid black;padding:4px;border-collapse: collapse;">{0}</td>
<td style="border:1px solid black;padding:4px;border-collapse: collapse;">{1}</td>
<td style="border:1px solid black;padding:4px;border-collapse: collapse;">{2}</td>
"""

Amphlett_InputParams = {
"T": "Cell operation temperature [K]",
"PH2": "Partial pressure [atm]",
Expand Down

0 comments on commit 15877ef

Please sign in to comment.