devbrain 0.1.0

Local-first CLI to capture, search, and recall developer workflow (commands, errors, and fixes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::models::Entry;

const SEPARATOR: &str = "----------------------------------------";

pub fn print_entry(entry: &Entry) {
    println!("{SEPARATOR}");
    println!(
        "[{:<7}] {:<8} {}",
        entry.entry_type.as_str().to_uppercase(),
        entry.project,
        entry.timestamp
    );
    println!("{}", entry.content);
    println!();
}