Update
This commit is contained in:
parent
224441bc5b
commit
fa808ee41c
17
build.py
17
build.py
@ -14,10 +14,19 @@ if __name__ == '__main__':
|
||||
logging.info('reading csv')
|
||||
reader = csv.DictReader(file)
|
||||
for row in reader:
|
||||
subst += f'<tr><td>{row['service']}</td><td>' + \
|
||||
f'<a target="_blank" href="{wrap_url(row["url"])}">{row["url"]}</a></td>' + \
|
||||
f'<td><a target="_blank" href="{wrap_url(row["ip"])}">{row["ip"]}</a></td>' + \
|
||||
f'<td>{row["comment"]}</td>'
|
||||
subst += f'<tr><td>{row['service']}</td>'
|
||||
if row['url'] == '':
|
||||
subst += '<td></td>'
|
||||
else:
|
||||
subst += f'<td><a target="_blank" href="{wrap_url(row["url"])}">{row["url"]}</a></td>'
|
||||
if row['ip'] == '':
|
||||
subst += '<td></td>'
|
||||
else:
|
||||
subst += f'<td><a target="_blank" href="{wrap_url(row["ip"])}">{row["ip"]}</a></td>'
|
||||
if row['comment'] == '':
|
||||
subst += '<td></td>'
|
||||
else:
|
||||
subst += f'<td>{row["comment"]}</td>'
|
||||
|
||||
logging.info('write file')
|
||||
with open('template/template.html') as inf:
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
service,url,ip,comment
|
||||
Resilio Sync,,10.80.15.3:8088,
|
||||
Webmin,,10.80.15.254:10000,
|
||||
qBittorrent,qb.pt.home,10.80.15.4:8080,
|
||||
|
Loading…
Reference in New Issue
Block a user