the frontmatter due should be date... I don't want due anywhere
- Renamed `TaskFrontmatter.due` → `TaskFrontmatter.date`; YAML key on disk is now `date:` instead of `due:` - Added `#[serde(alias = "due")]` so existing task files with `due:` frontmatter still deserialize correctly - Updated google_tasks.rs to write `date:` instead of `due:` in generated YAML - Renamed CLI `--due` flag to `--date`; updated function signature and display string "Due:" → "Date:"
This commit is contained in:
parent
afedac7d32
commit
c73d6a99ea
|
|
@ -442,7 +442,7 @@ fn render_task_markdown(task: &Task) -> String {
|
||||||
};
|
};
|
||||||
let mut yaml = format!("id: {}\nstatus: {}\nversion: 1\n", task.id, status_str);
|
let mut yaml = format!("id: {}\nstatus: {}\nversion: 1\n", task.id, status_str);
|
||||||
if let Some(due) = task.date {
|
if let Some(due) = task.date {
|
||||||
yaml.push_str(&format!("due: {}\n", due.to_rfc3339()));
|
yaml.push_str(&format!("date: {}\n", due.to_rfc3339()));
|
||||||
}
|
}
|
||||||
if let Some(parent) = task.parent_id {
|
if let Some(parent) = task.parent_id {
|
||||||
yaml.push_str(&format!("parent: {}\n", parent));
|
yaml.push_str(&format!("parent: {}\n", parent));
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ impl From<&Task> for TaskFrontmatter {
|
||||||
Self {
|
Self {
|
||||||
id: task.id,
|
id: task.id,
|
||||||
status: task.status,
|
status: task.status,
|
||||||
due: task.date,
|
date: task.date,
|
||||||
has_time: task.has_time,
|
has_time: task.has_time,
|
||||||
version: task.version,
|
version: task.version,
|
||||||
parent: task.parent_id,
|
parent: task.parent_id,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue