Генератор звіту про гонку F1 Monaco 2018 з CLI інтерфейсом
Project description
F1 Monaco 2018 Race Report Generator
A command‑line tool for parsing lap‑time logs and generating a formatted report of the F1 Monaco 2018 Grand Prix.
Table of Contents
Overview
This Python utility reads three files—start.log, end.log, and abbreviations.txt—to compute each driver’s total lap time for the 2018 Monaco Grand Prix, then prints a sorted leaderboard. You can choose ascending or descending order, and filter by a single driver’s name.
Features
- Parses timestamped log files and driver abbreviations.
- Calculates total race time for each competitor.
- Supports sorting results in ascending (fastest first) or descending (slowest first) order.
- Optional filtering to display a specific driver’s result.
- Clearly formatted console output with ranking, driver name, team, and time.
Prerequisites
- Python 3.12 or higher
- Standard library only; no external dependencies
Installation
-
Clone the repository:
git clone git@git.foxminded.ua:foxstudent108448/report-of-monaco-2018-racing.git```
-
Ensure the three input files are placed in a single folder:
start.logend.logabbreviations.txt
Usage
Run the script main.py (or whatever you rename main.py) with the required --files argument pointing to your folder.
python main.py --files /path/to/logs [--asc] [--desc] [--driver DRIVER_NAME]
Required Arguments
--filesPath to the directory containingstart.log,end.log, andabbreviations.txt.
Optional Flags
--ascSort the report in ascending order (fastest times first). This is the default if neither--ascnor--descis specified.--descSort the report in descending order (slowest times first).--driver DRIVER_NAMEOnly display the result for the driver whose full name matchesDRIVER_NAME(case‑insensitive).
Examples
-
Generate an ascending leaderboard (default):
python main.py --files ./data
-
Generate a descending leaderboard:
python main.py --files ./data --desc
-
Show only Lewis Hamilton’s result:
python main.py --files ./data --driver "Lewis Hamilton"
Project Structure
f1‑monaco‑2018‑report/
├── main.py # Entry‑point script with argparse
├── report/
│ └── report_maker.py # Logic to parse logs and build the report
├── data/ # Example folder containing:
│ ├── start.log
│ ├── end.log
│ └── abbreviations.txt
└── README.md # This file
License
This project is licensed under the MIT License. Feel free to use, modify, and distribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file report_of_monaco_2018_racing-0.1.0.tar.gz.
File metadata
- Download URL: report_of_monaco_2018_racing-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c54b25050919c05ba2be69b4c11ddc5c885a96e28e3e423638ba09b00c06df
|
|
| MD5 |
b2670acddfe9e6628d8ef04350a505db
|
|
| BLAKE2b-256 |
3a18020366a33f34ea694b270f20b5ad93cc3c3504b8e9a6912c75305959de17
|
File details
Details for the file report_of_monaco_2018_racing-0.1.0-py3-none-any.whl.
File metadata
- Download URL: report_of_monaco_2018_racing-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0d5f6ff8aa7bfcc3d0d693fbf52ac254ab8074e1e70119a73035cab72c37513
|
|
| MD5 |
0b1c776ef018dda9e2f94b89f49686be
|
|
| BLAKE2b-256 |
b4f721f49dbcfd500bcf8db61a63eea1138e1c100b573f11906365225000e95c
|