def update_html(df, sradb_timestamp):
pd.set_option('display.max_colwidth', -1)
table_html = df.to_html(formatters={
"doi": format_doi, "srx": format_srx}, escape=False, index=False, justify="left", classes="table table-striped table-bordered")
html_template_str = unicode(open("sra_template.html").read())
n_overdue = df.shape[0]
final_html = html_template_str.format(date_updated=datetime.date.today(), sradb_timestamp=sradb_timestamp,
n_overdue=n_overdue, table_html=table_html, tracking_script=tracking_script)
with open("docs/sra.html", "w") as f:
f.write(final_html.encode("utf-8"))
评论列表
文章目录