:PROPERTIES: :template: 四象限 :END:
#+BEGIN_QUERY {:query [:find (pull ?b [*]) :in $ ?end :where [?b :block/marker ?marker] [?b :block/priority "A"] ;; 优先级在A的才认为是重要 [?b :block/properties ?p] [(get ?p "type") ?t] [(contains? #{"任务" "行动" "项目"} ?t)] ;; 属性中type字段包含这三种 [(not= "DONE" ?marker)] ;; 不包含已完成任务 (or [?b :block/scheduled ?d] [?b :block/deadline ?d]) [(<= ?d ?end)] ] :inputs [:5d-after] ;; 时间跨度,5天内的算作紧急 } #+END_QUERY
#+BEGIN_QUERY { :query [:find (pull ?b [*]) :in $ ?end :where [?b :block/marker ?marker] [?b :block/priority "A"] ;; 优先级在A的才认为是重要 [?b :block/properties ?p] [(get ?p "type") ?t] [(contains? #{"任务" "行动" "项目"} ?t)] ;; 属性中type字段包含这三种 [(not= "DONE" ?marker)] ;; 不包含已完成任务 (or [?b :block/scheduled ?d] [?b :block/deadline ?d]) [(> ?d ?end)] ;; DDL在5天以上 ] :inputs [:5d-after] ;; 时间跨度,5天内的算作紧急 } #+END_QUERY
#+BEGIN_QUERY { :query [:find (pull ?b [*]) :in $ ?end :where [?b :block/marker ?marker] [?b :block/properties ?p] [?b :block/priority ?priority] [(get ?p "type") ?t] [(contains? #{"任务" "行动" "项目"} ?t)] ;; 属性中type字段包含这三种 [(!= "DONE" ?marker)] ;; 不包含已完成任务 [(!= "A" ?priority)] ;; 优先级在A的才认为是重要 (or [?b :block/scheduled ?d] [?b :block/deadline ?d]) [(<= ?d ?end)] ] :inputs [:5d-after] ;; 时间跨度,5天内的算作紧急 } #+END_QUERY
#+BEGIN_QUERY { :query [:find (pull ?b [*]) :in $ ?end :where [?b :block/marker ?marker] [?b :block/properties ?p] [?b :block/priority ?priority] [(get ?p "type") ?t] [(contains? #{"任务" "行动" "项目"} ?t)] ;; 属性中type字段包含这三种 [(!= "DONE" ?marker)] ;; 不包含已完成任务 [(!= "A" ?priority)] (or [?b :block/scheduled ?d] [?b :block/deadline ?d]) [(> ?d ?end)] ] :inputs [:5d-after] ;; 时间跨度,5天内的算作紧急 } #+END_QUERY