Switched to new logo and added CLI options for port and address.

This commit is contained in:
2026-06-05 13:22:10 +01:00
parent 3066b62ba3
commit ed477f02b6
2 changed files with 14 additions and 5 deletions
+10 -1
View File
@@ -1,14 +1,23 @@
"""
CLI for starting the fares server.
"""
# pyright: reportAny=false
# Imports
from fares_site.serve import create_fares_server, FaresServer
from argparse import ArgumentParser
# Script
def main():
server: FaresServer = create_fares_server()
parser = ArgumentParser()
_ = parser.add_argument("-p", "--port", default=12_000)
_ = parser.add_argument("-a", "--address", default="127.0.0.1")
args = parser.parse_args()
server: FaresServer = create_fares_server(
address=str(args.address),
port=int(args.port),
)
server.serve_forever()
+4 -4
View File
@@ -20,11 +20,11 @@ HTML_CONTENT_HEADER = """
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Tag_with_pound_Pinhead_icon.svg/250px-Tag_with_pound_Pinhead_icon.svg.png">
<link rel="icon" type="image/x-icon" href="https://cdn.ballast-data.co.uk/Logo.svg">
</head>
<body style="font-family: 'Merriweather Sans';">
<img height=30px src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Tag_with_pound_Pinhead_icon.svg/250px-Tag_with_pound_Pinhead_icon.svg.png">
BALLAST DATA | Fares <br>
<body style="font-family: 'Merriweather Sans'; font-size: 1.6em;">
<img height=67px src="https://cdn.ballast-data.co.uk/Logo.svg">
<b> Fares </b> <br>
<br>
"""