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 bd22d6d commit e025ace
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
17 changes: 2 additions & 15 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
from opem.Params import Version, Website, UpdateUrl, Warning_Message_1, Warning_Message_2, HTML_Init_Template, HTML_Input_Table_Template1
import io
import os
import requests
Expand Down Expand Up @@ -449,20 +449,7 @@ def HTML_Input_Table(Input_Dict, Input_Params, file):
:type file : file object
:return: None
"""
file.write('<h2 style="color:#ff7600;">Inputs</h2>\n')
file.write(
'<table style="border:1px solid black;border-collapse: collapse;margin:15px;">\n')
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' +
"Input\n</td>")
file.write(
'<td style="border:1px solid black;padding:4px;border-collapse: collapse;">\n' +
"Description\n</td>")
file.write(
'<td style="border:1px solid black;padding:4px;border-collapse: collapse;">\n' +
"Value\n</td>\n</tr>\n")
file.write(HTML_Input_Table_Template1)
Input_Params_Keys = sorted(Input_Params.keys())
for key in Input_Params_Keys:
file.write(
Expand Down
10 changes: 10 additions & 0 deletions opem/Params.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
<h1 style="border-bottom:1px solid black;text-align:center;padding:10px;"><span style="color:#ff7600;">OPEM</span> Report ({2} Model)</h1>
"""

HTML_Input_Table_Template1 = """
<h2 style="color:#ff7600;">Inputs</h2>
<table style="border:1px solid black;border-collapse: collapse;margin:15px;">
<tr align="center" style="border:1px solid black;border-collapse: collapse;">
<td style="border:1px solid black;padding:4px;border-collapse: collapse;">Input</td>
<td style="border:1px solid black;padding:4px;border-collapse: collapse;">Description</td>
<td style="border:1px solid black;padding:4px;border-collapse: collapse;">Value</td>
</tr>
"""

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

0 comments on commit e025ace

Please sign in to comment.