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.0.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.0-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.0.tar.gz.

File metadata

File hashes

Hashes for report_of_monaco_2018_racing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25c54b25050919c05ba2be69b4c11ddc5c885a96e28e3e423638ba09b00c06df
MD5 b2670acddfe9e6628d8ef04350a505db
BLAKE2b-256 3a18020366a33f34ea694b270f20b5ad93cc3c3504b8e9a6912c75305959de17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for report_of_monaco_2018_racing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0d5f6ff8aa7bfcc3d0d693fbf52ac254ab8074e1e70119a73035cab72c37513
MD5 0b1c776ef018dda9e2f94b89f49686be
BLAKE2b-256 b4f721f49dbcfd500bcf8db61a63eea1138e1c100b573f11906365225000e95c

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