Skip to content

martastn/cli-time-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

CLI Time Manager is a console application for efficient task and work category management. The program enables progress tracking, deadline setting, and productivity statistics generation.

✨ Features

Category Management

  • Add new categories
  • Rename existing categories
  • Delete categories

Task Management

  • Add tasks with category assignment
  • Rename tasks
  • Set status (NotStarted, InProgress, Done)
  • Set deadlines with multiple date format support
  • Add/edit notes
  • Delete tasks

Filtering and Display

  • Task list in table or list format
  • Filter by:
    • Category
    • Status
    • Deadline/note presence
    • Name substring
  • Display categories with task counts

Statistics

  • Total number of tasks and categories
  • Task count by status
  • Task count by category
  • List of overdue tasks

🛠️ Installation and Usage

Requirements

  • Rust (version 1.70 or newer)
  • Cargo

Compilation

git clone https://github.com/martastn/cli-time-manager.git
cd cli-time-manager/projekt
cargo build --release

Running

cargo run -- [COMMAND] [OPTIONS]

🔧 Available Commands

Category Commands

  • add-category <NAME>
  • rename-category <OLD_NAME> <NEW_NAME>
  • delete-category <NAME>

Task Commands

  • add-task <NAME> <CATEGORY>
  • rename-task <OLD_NAME> <NEW_NAME>
  • set-status <NAME> <STATUS>
  • set-deadline <NAME> <DEADLINE>
  • set-note <NAME> <NOTE>
  • delete-note <NAME>
  • delete-task <NAME>

Display Commands

  • list-tasks - with optional filters: --category, --status, --with-deadline, --without-deadline, --with-note, --without-note, --name-contains, --table
  • list-categories - with optional --with-counts and --table flags
  • show-stats - display comprehensive statistics

Usage Examples

Category Management

# Add category
cargo run -- add-category "Programming"

# Rename category
cargo run -- rename-category "Programming" "Software Development"

# Delete category
cargo run -- delete-category "Programming"

Task Management

# Add task
cargo run -- add-task "Implement module" "Programming"

# Change status
cargo run -- set-status "Implement module" "InProgress"

# Set deadline
cargo run -- set-deadline "Implement module" "2024-12-31 18:00"

# Add note
cargo run -- set-note "Implement module" "Priority: High"

Display Commands

# Task list as table
cargo run -- list-tasks --table

# Filtered task list
cargo run -- list-tasks --category "Programming" --status "InProgress"

# Categories with task counts
cargo run -- list-categories --with-counts

# Show statistics
cargo run -- show-stats

Date Formats for Deadlines

The program supports three date formats:

  • YYYY-MM-DD (e.g., 2024-12-31)
  • YYYY-MM-DD HH:MM (e.g., 2024-12-31 18:00)
  • RFC3339/ISO8601 (e.g., 2024-12-31T18:00:00+01:00)

🏗️ Project Structure

project/
├── src/
│   ├── main.rs          # Main application file, CLI handling
│   ├── cli.rs           # CLI command definitions
│   ├── models/          # Data structures
│   │   ├── mod.rs
│   │   ├── task.rs      # Task and Status structures
│   │   └── category.rs  # Category structure
│   ├── storage/         # Data storage logic
│   │   ├── mod.rs
│   │   └── storage.rs   # Task and category management
│   ├── view/           # Data display
│   │   ├── mod.rs
│   │   └── view.rs     # Table and list formatting
│   └── stats/          # Statistics
│       ├── mod.rs
│       └── stats.rs    # Statistical functions
├── storage.json        # Data storage file
└── Cargo.toml

📦 Dependencies

  • clap - CLI argument parsing
  • serde - data serialization/deserialization
  • chrono - date and time handling
  • uuid - unique identifier generation
  • prettytable-rs - console table formatting

💾 Data Storage

Data is automatically saved to storage.json in JSON format after each modification operation. The file is created automatically on first run.

About

A command-line time and task management system written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published