From d124abb879c87a537af32d11f352290dddebd42d Mon Sep 17 00:00:00 2001 From: yourfriendoss Date: Fri, 22 Aug 2025 15:36:00 +0300 Subject: [PATCH] feat: Remove precise location, useless. --- README.md | 2 ++ src/main.rs | 30 +++--------------------------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 4427f50..d7be4d9 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ This project connects to the Blitzortung lightning detection network and sends n - Filters lightning strikes by your chosen location and radius. - Sends rich notifications to your devices via [ntfy.sh](https://ntfy.sh/). - Optionally displays details about the detectors involved in each strike. +- Supports multiple locales for notifications +- Gives you rough location of where the strike was using the nominatim api ## Usage diff --git a/src/main.rs b/src/main.rs index 98a4ab4..55120e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -135,19 +135,11 @@ fn get_localized_message( "• Kavēšanās: {}ms\n\ • Statuss: {}\n\ • Reģions: {}\n\ - • Atrašanās vieta: {:.5}, {:.5}\n\ • Aptuvenā vieta: {}\n\ • Attālums līdz jums: {:.2} km\n\ • Izmantotie detektori:\n{}\n\ Esiet drošībā! 🌩️", - all.delay, - all.status, - all.region, - lon, - lat, - location_name, - distance_km, - detectors_str + all.delay, all.status, all.region, location_name, distance_km, detectors_str ), "⚡ Zibens trieciens konstatēts".to_string(), ) @@ -172,19 +164,11 @@ fn get_localized_message( "• Задержка: {}мс\n\ • Статус: {}\n\ • Регион: {}\n\ - • Местоположение: {:.5}, {:.5}\n\ • Примерное место: {}\n\ • Расстояние до вас: {:.2} км\n\ • Использованные детекторы:\n{}\n\ Будьте осторожны! 🌩️", - all.delay, - all.status, - all.region, - lon, - lat, - location_name, - distance_km, - detectors_str + all.delay, all.status, all.region, location_name, distance_km, detectors_str ), "⚡ Обнаружен удар молнии".to_string(), ) @@ -209,19 +193,11 @@ fn get_localized_message( "• Delay: {}ms\n\ • Status: {}\n\ • Region: {}\n\ - • Location: {:.5}, {:.5}\n\ • Approximate place: {}\n\ • Distance to you: {:.2} km\n\ • Used detectors:\n{}\n\ Stay safe! 🌩️", - all.delay, - all.status, - all.region, - lon, - lat, - location_name, - distance_km, - detectors_str + all.delay, all.status, all.region, location_name, distance_km, detectors_str ), "⚡ Lightning Strike Detected".to_string(), )