Skip to content

Instantly share code, notes, and snippets.

@pbandreddy
Created April 26, 2023 11:12
Show Gist options
  • Save pbandreddy/bf509b41207d92c07b2c4b744651d96f to your computer and use it in GitHub Desktop.
Save pbandreddy/bf509b41207d92c07b2c4b744651d96f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Upload a HAR file and convert it to CSV</title>
<style>
input[type="file"], input[type="submit"], input[type="text"] {
padding: 10px;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
font-weight: bold;
letter-spacing: 1px;
}
input[type="file"] {
background-color: #464A44;
color: #fff;
}
input[type="submit"] {
background-color: #E6890C;
color: #fff;
}
input[type="submit"]:hover {
background-color: #A2CE79;
}
label {
font-size: 16px;
margin-right: 10px;
}
/* added border style */
#domain {
border: 1px solid #E6890C;
padding: 3px;
}
</style>
</head>
<body>
<div style="display: flex; align-items: center; margin-top: 50px;">
<img src="https://open-frontend-bucket.s3.amazonaws.com/logos/logo-type-purple.svg" alt="Your Logo" style="height: 50px; width: auto; margin-right: 10px;">
</div>
<div style="display: flex; flex-direction: column; align-items: center; margin-top: 50px;">
<h1>Upload a HAR file and convert it to CSV</h1>
<form method="POST" enctype="multipart/form-data" action="{{ url_for('convert') }}">
<input type="file" name="file" accept=".har">
<label for="domain">Enter domain:</label>
<input type="text" id="domain" name="domain">
<input type="submit" value="Convert">
</form>
</div>
{% if csv_contents %}
<h2>CSV Contents:</h2>
<pre>{{ csv_contents }}</pre>
{% endif %}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment