Crates.io | weather_parser |
lib.rs | weather_parser |
version | 0.1.0 |
source | src |
created_at | 2024-11-10 21:00:31.602645 |
updated_at | 2024-11-10 21:00:31.602645 |
description | A parser for extracting data about weather |
homepage | |
repository | https://github.com/AndriiKviatkovskyi/weather_parser |
max_upload_size | |
id | 1443209 |
size | 140,141 |
This project implements a parser that extracts and formats detailed weather condition data from structured text inputs. It can parse various weather parameters and format them into JSON.
The parser reads structured text inputs containing weather conditions, applies grammar rules and outputs the parsed results as structured data. It takes a string, which consists of following parts:
After that, it splits it by ';' symbol using special grammar rule and analyzes, whether each part matches required grammar rule. With every match it is putting new object to HashMap, which is later transfered to JSON using serde_json and gets written into file, chosen by user in CLI.
The parser allows user to convert intuitively understandable weather conditions to JSON format, required by many applications, which can save a lot of time and effort. It can be used for various applications, including:
The parser's output can be used to build historical weather reports, monitor real-time conditions, or assist in building predictive models for weather trends.