GPT-4 input 1 adhoc script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import csv | |
def e(s): | |
return s.replace('&', '&').replace('<', '<').replace('>', '>').replace('\n', '<br>').replace('', '*') | |
print(""" | |
<html> | |
<style> | |
body { | |
font-family: Roboto,RobotoDraft,Helvetica,Arial,sans-serif; | |
} | |
div.entry { | |
margin: 0; | |
margin-top: 2em; | |
margin-bottom: 2em; | |
padding: 1em; | |
background: #eef2ff; | |
} | |
</style> | |
<body> | |
""") | |
with open('cfp.csv', newline=None) as csvfile: | |
reader = csv.reader(csvfile) | |
first = True | |
for row in reader: | |
if first: | |
first = False | |
continue | |
r = [e(x) for x in row] | |
id, name, last_name, _, _, _, company, bio, topic, category, level, abstract, language, additional = r[:14] | |
if not topic and not abstract: | |
continue | |
print(f""" | |
<div class="entry"> | |
<p> | |
<b>Id</b>: {id}<br> | |
<b>Who</b>: {name} {last_name} / {company}<br> | |
<b>What</b>: {topic}<br> | |
<b>For</b>: {category} / {level} / {language}<br> | |
</p> | |
<p><b>Abstract:</b><br>{abstract}</p> | |
<p><b>Additional:</b><br>{additional}</p> | |
<p><b>Bio:</b><br>{bio}</p> | |
</div> | |
""") | |
print(""" | |
</body> | |
</html> | |
""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment