Add --version flags and more to all binaries
This commit is contained in:
+6
-1
@@ -11,6 +11,11 @@ use roowho2_lib::{proto::WhodStatusUpdate, server::rwhod::RwhodClientProxy};
|
||||
///
|
||||
/// Machines for which no status report has been received for 11 minutes are shown as being down.
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||
about,
|
||||
version
|
||||
)]
|
||||
pub struct Args {
|
||||
/// Users idle an hour or more are not counted unless the `-a` flag is given.
|
||||
#[arg(long, short)]
|
||||
@@ -120,7 +125,7 @@ fn old_format_machine_entry(all: bool, entry: &WhodStatusUpdate) -> String {
|
||||
let uptime_str = if days > 0 {
|
||||
format!("{:3}+{:02}:{:02}", days, hours, minutes)
|
||||
} else if uptime_minutes < 0 || days > 999 {
|
||||
format!(" ??:??")
|
||||
" ??:??".to_string()
|
||||
} else {
|
||||
format!(" {:2}:{:02}", hours, minutes)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user