Switched to new logo and added CLI options for port and address.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -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>
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user