generated from Astrial.org/template
Compare commits
3 commits
7241a1e8cd
...
375d547bc1
Author | SHA1 | Date | |
---|---|---|---|
375d547bc1 | |||
c97472914f | |||
6a3f3cee9d |
3 changed files with 15 additions and 1 deletions
|
@ -12,6 +12,7 @@ diaryrs
|
||||||
deserialised
|
deserialised
|
||||||
indoc
|
indoc
|
||||||
mgmt
|
mgmt
|
||||||
|
tzdb
|
||||||
serde
|
serde
|
||||||
|
|
||||||
# Diary Entries
|
# Diary Entries
|
||||||
|
|
|
@ -35,7 +35,7 @@ pub struct Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
const CONFIG_PATHS: [&str; 5] = [
|
const CONFIG_PATHS: [&'static str; 5] = [
|
||||||
"diaryrs.toml",
|
"diaryrs.toml",
|
||||||
"diary.toml",
|
"diary.toml",
|
||||||
"~/.config/diaryrs.toml",
|
"~/.config/diaryrs.toml",
|
||||||
|
|
13
src/mgmt.rs
13
src/mgmt.rs
|
@ -25,6 +25,19 @@ pub struct Inventory {
|
||||||
pub avg_word_count: f64,
|
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
|
/// Represents a single diary entry (markdown file) and its associated stats/metadata
|
||||||
///
|
///
|
||||||
/// Does not include the actual contents of the entry, only stats
|
/// Does not include the actual contents of the entry, only stats
|
||||||
|
|
Loading…
Reference in a new issue