Skip to main content

Генератор звіту про гонку 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

  1. Clone the repository:

    git clone git@git.foxminded.ua:foxstudent108448/report-of-monaco-2018-racing.git```
    
  2. Ensure the three input files are placed in a single folder:

    • start.log
    • end.log
    • abbreviations.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

  • --files Path to the directory containing start.log, end.log, and abbreviations.txt.

Optional Flags

  • --asc Sort the report in ascending order (fastest times first). This is the default if neither --asc nor --desc is specified.
  • --desc Sort the report in descending order (slowest times first).
  • --driver DRIVER_NAME Only display the result for the driver whose full name matches DRIVER_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

report_of_monaco_2018_racing-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

report_of_monaco_2018_racing-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file report_of_monaco_2018_racing-0.1.1.tar.gz.

File metadata

File hashes

Hashes for report_of_monaco_2018_racing-0.1.1.tar.gz
Algorithm Hash digest
SHA256 23a92d76b436d30a5706099eccc09228c19817e66f5f407106065b7efa008185
MD5 571387cddd62151e4a81f40bf2e28325
BLAKE2b-256 6f60075061a8bc3c0a3c0a27f1ff76afa2d32f77d68afd2bc8242ba10662df01

See more details on using hashes here.

File details

Details for the file report_of_monaco_2018_racing-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for report_of_monaco_2018_racing-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce33a57762518d84bd5c890d88999144c7c26c0bb85fa8dcffbb647172d36b5b
MD5 d7d27f5dbd28e32b64e4c4b4fe8e3495
BLAKE2b-256 ca7930c68add921cf3d3359240a9d107037ba7219c49c38314c3114c9055e8df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page