rtimelogger 0.8.4

A simple cross-platform CLI tool to track working hours, lunch breaks, and calculate surplus time
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::cli::parser::Commands;
use crate::config::Config;
use crate::core::log::LogLogic;
use crate::db::pool::DbPool;
use crate::errors::AppResult;

pub fn handle(cmd: &Commands, cfg: &Config) -> AppResult<()> {
    if matches!(cmd, Commands::Log { print: true }) {
        let mut pool = DbPool::new(&cfg.database)?;
        LogLogic::print_log(&mut pool, cfg)?;
    }

    Ok(())
}