1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
pub mod cli;
pub mod logger;
pub mod list;
pub mod entry;
pub mod archive;
pub mod moc;
pub mod since;
pub mod pull;
pub mod export;
pub mod search;
pub mod sort;
pub mod scribe;
pub mod about;
pub mod uncommit;

pub use logger::*;
pub use scribe::*;

pub fn home_dir() -> std::path::PathBuf {
    // Linux only; change this if you want to go cross platform
    match std::env::var("HOME") {
        Ok(path) => std::path::Path::new(&path).join(".diary-cli"),
        Err(_) => std::path::PathBuf::from("/etc/diary-cli/"),
    }
}