feat: separate description specifiers
This commit is contained in:
parent
f89615d8e4
commit
fbbdd5eef8
|
@ -63,9 +63,10 @@ An active tag or state filter will also set that attribute for newly created tas
|
|||
- `parentid`
|
||||
- `name`
|
||||
- `state`
|
||||
- `tags`
|
||||
- `hashtags`
|
||||
- `desc` - accumulated notes of the task
|
||||
- `tags` - values of all nostr tags associated with the event, except event tags
|
||||
- `desc` - last note on the task
|
||||
- `description` - accumulated notes on the task
|
||||
- `path` - name including parent tasks
|
||||
- `rpath` - name including parent tasks up to active task
|
||||
- `time` - time tracked
|
||||
|
@ -73,7 +74,9 @@ An active tag or state filter will also set that attribute for newly created tas
|
|||
- TBI: `progress` - how many subtasks are complete
|
||||
- TBI: `progressp` - subtask completion in percent
|
||||
|
||||
For debugging: `props`, `alltags`
|
||||
For debugging: `props`, `alltags`, `descriptions`
|
||||
|
||||
TODO: Combined formatting and recursion specifiers
|
||||
|
||||
## Plans
|
||||
|
||||
|
|
|
@ -143,6 +143,8 @@ impl Task {
|
|||
"state" => self.state().map(|s| s.to_string()),
|
||||
"name" => Some(self.event.content.clone()),
|
||||
"time" => Some(format!("{}m", self.time_tracked().div(60))),
|
||||
"desc" => self.descriptions().last().cloned(),
|
||||
"description" => Some(self.descriptions().join(" ")),
|
||||
"hashtags" => self.filter_tags(|tag| {
|
||||
tag.single_letter_tag()
|
||||
.is_some_and(|sltag| sltag.character == Alphabet::T)
|
||||
|
@ -160,7 +162,6 @@ impl Task {
|
|||
"{:?}",
|
||||
self.descriptions().collect::<Vec<&String>>()
|
||||
)),
|
||||
"desc" | "description" => self.descriptions().last().cloned(),
|
||||
_ => {
|
||||
warn!("Unknown task property {}", property);
|
||||
None
|
||||
|
|
Loading…
Reference in New Issue