Compare commits

..

3 commits

Author SHA1 Message Date
375d547bc1 chore: add tzdb to dict 2025-01-19 21:47:28 +11:00
c97472914f refactor(wip): add Metadata struct 2025-01-18 10:02:11 +11:00
6a3f3cee9d fix: assign lifetime to const str 2025-01-17 21:57:52 +11:00
3 changed files with 15 additions and 1 deletions

View file

@ -12,6 +12,7 @@ diaryrs
deserialised
indoc
mgmt
tzdb
serde
# Diary Entries

View file

@ -35,7 +35,7 @@ pub struct Config {
}
impl Config {
const CONFIG_PATHS: [&str; 5] = [
const CONFIG_PATHS: [&'static str; 5] = [
"diaryrs.toml",
"diary.toml",
"~/.config/diaryrs.toml",

View file

@ -25,6 +25,19 @@ pub struct Inventory {
pub avg_word_count: f64,
}
/// Represents the front-matter metadata included within each entry. Does not necessarily have to be associated with any real diary entry.
#[derive(Debug)]
pub struct Metadata {
timestamp: String,
timezone: String,
}
impl Metadata {
pub fn read_from_entry(contents: String) {
}
}
/// Represents a single diary entry (markdown file) and its associated stats/metadata
///
/// Does not include the actual contents of the entry, only stats