start working on bar pinger and traewelling client
This commit is contained in:
parent
867514362a
commit
718fe00b46
13 changed files with 1062 additions and 48 deletions
35
programs/traveldings/src/main.rs
Normal file
35
programs/traveldings/src/main.rs
Normal file
|
@ -0,0 +1,35 @@
|
|||
use std::{default, fs};
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use commands::current_journey::get_current_journey;
|
||||
use reqwest::{
|
||||
header::{self, HeaderMap},
|
||||
ClientBuilder,
|
||||
};
|
||||
use traewelling::model::{Container, Status};
|
||||
|
||||
mod commands;
|
||||
mod traewelling;
|
||||
|
||||
#[derive(Parser)]
|
||||
struct Cli {
|
||||
#[command(subcommand)]
|
||||
subcommand: Subcommands,
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Clone)]
|
||||
enum Subcommands {
|
||||
/// Watch for a current journey and give out json info about it
|
||||
Current,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let args = Cli::parse();
|
||||
|
||||
match args.subcommand {
|
||||
Subcommands::Current => get_current_journey().await?,
|
||||
};
|
||||
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue