monochromium 0.1.0

A fast, local-first CLI note-taking app for developers
1
2
3
4
5
6
7
8
9
10
11
12
use crate::database::read_single_row;

pub async fn view(conn: libsql::Connection, node_id: u32, no_format: bool) -> String {
    let note = read_single_row(conn, node_id).await.unwrap();

    let output = format!(
        "{} \u{2022} ID: {} \u{2022} {}\n {}",
        note.title, note.id, note.date, note.content
    );

    output
}