Programme de prévisions météo dans le terminal écrit en Rust

Overview

Météo France TUI

Capture écran

Programme graphique en ligne de commande qui permet de consulter les prévisions de Météo France.

Installation

Pour installer Météo TUI, téléchargez l'archive, rendez vous dans le dossier d'extraction depuis le terminal puis compilez et installez le programme à l'aide des commandes suivantes :

$ cargo install --path .
$ meteo

Utilisation

Commandes possibles :

  • meteo : ouvrir les prévisions météo de la ville par défaut.
  • meteo carte : ouvrir les prévisions météo des principales villes de France.
  • meteo <code postal> : ouvrir les prévisions météo d'une ville particulière.

Le programme se divise en deux onglets (navigation grâce à la touche TAB ) :

  • Carte : onglet qui permet d'accéder rapidement aux prévisions météo des principales villes de France. Changer de ville est possible en utilisant les flèches du clavier.
  • Prévisions : onglet permettant de visualiser les prévisions météo détaillées d'une ville précise. Les prévisions sont disponibles jusqu'à 8 jours dans le futur. Chaque prévision comprend le temps, les températures maximales et minimales, le pourcentage d'humidité et les heures de lever/coucher du soleil.

Dépendances

Le programme utilise les dépendances suivantes :

  • Serde JSON pour transformer les données Météo France en structures Rust.
  • Reqwest pour exécuter des requêtes HTTP et récupèrer le contenu de pages web.
  • Crossterm et tui-rs pour l'interface utilisateur dans le terminal.
  • Confy pour sauvegarder la configuration du programme.
  • Chrono pour la manipulation des dates et des heures.

Amélioration à envisager :

  • Connaître les précipitations dans l'heure.
  • Trouver un moyen d'accélérer le démarrage. Pour l'instant le programme prend beaucoup de temps car il doit exécuter 8 requêtes HTTP avant l'ouverture (les prévisions des 7 villes de la carte et de la ville par défaut). Peut-être envisager un lancement asynchrone des requêtes internet.

API - Météo France

Les données Météo France sont récupérables depuis leur API caché webservice.meteofrance.com. J'ai trouvé un jeton de connexion depuis le code de source de l'application Geometric Weather (sous licence GPL, dispo ici).

You might also like...
A small command-line application to view images from the terminal written in Rust.
A small command-line application to view images from the terminal written in Rust.

A small command-line application to view images from the terminal written in Rust. It is basically the front-end of viuer

A lightweight terminal menu for Rust
A lightweight terminal menu for Rust

youchoose A simple, easy to use command line menu for Rust. Usage There are two methods you need to be familiar with to get started: Menu::new which t

Simple Interactive Terminal Todo App in Rust
Simple Interactive Terminal Todo App in Rust

todo-rs Simple Interactive Terminal Todo App in Rust Quick Start $ cargo run TODO Controls Keys Description k, j Move cursor up and down Shift+K, Shif

Warp is a blazingly fast, Rust-based terminal that makes you and your team more productive at running, debugging, and deploying code and infrastructure.
Warp is a blazingly fast, Rust-based terminal that makes you and your team more productive at running, debugging, and deploying code and infrastructure.

Warp is a blazingly fast, Rust-based terminal that makes you and your team more productive at running, debugging, and deploying code and infrastructure.

Replace an app's icon from a png with a single terminal script. Made with Rust

Replace macOS App Icon Replace an app's icon from a png with a single terminal CLI. Made with Rust

Pokédex in your terminal, thanks to Rust

mon - a command line Pokédex Uses art from pokemon-colorscripts and Pokémon data from PokéAPI. Building Rust up! Tested on: rustc --version rustc 1.

 joshuto: ranger-like terminal file manager written in Rust.
joshuto: ranger-like terminal file manager written in Rust.

joshuto: ranger-like terminal file manager written in Rust.

Terminal based GUI for eAsistent written in Rust

Terminal based GUI for eAsistent written in Rust This project is currently work in progress. I will update this readme with features that I'm currentl

Simple system monitoring app that runs on terminal. Made purely with Rust.
Simple system monitoring app that runs on terminal. Made purely with Rust.

What is it? RCTOP is a simple WIP system monitoring app that runs purely on terminal and doesn't feature GUI. One can compare it to htop, but more str

Owner
César
Etudiant en informatique à paris 8
César
ask.sh: AI terminal assistant that can read and write your terminal directly!

ask.sh: AI terminal assistant that read from & write to your terminal ask.sh is an AI terminal assistant based on OpenAI APIs such as GPT-3.5/4! What'

hmirin 5 Jun 20, 2023
A simple and efficient terminal UI implementation with ratatui.rs for getting quick insights from csv files right on the terminal

CSV-GREP csv-grep is an intuitive TUI application writting with ratatui.rs for reading, viewing and quickly analysing csv files right on the terminal.

Anthony Ezeabasili 16 Mar 10, 2024
🛎 60+ Elegant terminal spinners for Rust

Spinners - ?? 60+ Elegant terminal spinners for Rust ❤️ Shameless plug Charts, simple as a URL. No more server-side rendering pain, 1 url = 1 chart Lo

Francois-Guillaume Ribreau 435 Dec 26, 2022
Low-level Rust library for implementing terminal command line interface, like in embedded systems.

Terminal CLI Need to build an interactive command prompt, with commands, properties and with full autocomplete? This is for you. Example, output only

HashMismatch 47 Nov 25, 2022
Rust library for ANSI terminal colours and styles (bold, underline)

rust-ansi-term This is a library for controlling colours and formatting, such as red bold text or blue underlined text, on ANSI terminals. View the Ru

Benjamin Sago 407 Jan 2, 2023
Cross-platform Rust library for coloring and formatting terminal output

Coloring terminal output Documentation term-painter is a cross-platform (i.e. also non-ANSI terminals) Rust library for coloring and formatting termin

Lukas Kalbertodt 75 Jul 28, 2022
A dead simple ANSI terminal color painting library for Rust.

yansi A dead simple ANSI terminal color painting library for Rust. use yansi::Paint; print!("{} light, {} light!", Paint::green("Green"), Paint::red(

Sergio Benitez 169 Dec 25, 2022
(Rust) Coloring terminal so simple you already know how to do it !

Colored Coloring terminal so simple, you already know how to do it! "this is blue".blue(); "this is red".red(); "this is red on blue".red(

Thomas Wickham 1.2k Jan 4, 2023
Cross platform terminal library rust

Cross-platform Terminal Manipulation Library Crossterm is a pure-rust, terminal manipulation library that makes it possible to write cross-platform te

crossterm-rs 2.1k Jan 2, 2023
Build terminal user interfaces and dashboards using Rust

tui-rs tui-rs is a Rust library to build rich terminal user interfaces and dashboards. It is heavily inspired by the Javascript library blessed-contri

Florian Dehau 9.3k Jan 4, 2023