Daily Workflow

What to capture on a daily basis

Course Elements

Logseq for Professionals
Introduction

Workshop
Quick overview of the workshop

Approval
Dealing with the approval process and how not to get in trouble

Daily Workflow
What to capture on a daily basis

Projects
Handle projects from small to large

Tips
Small Tricks

In this section I will go through my daily workflow and provide tips on how to handle both the capture and task management on a daily basis. This is more in-depth then the overall workshop and there are some advanced queries that can help you get the most out of your daily page.

Let’s get started!

Video

Audio

Slides

Queries

My Daily Queries

Easy to copy and paste into your own config.edn

 1:default-queries {:journals [
 2{
 3  :title ["๐Ÿ—“ Scheduled" ]
 4  :query [:find (pull ?b [*])
 5    :in $ ?today
 6    :where
 7      [?b :block/marker ?marker]
 8      [(contains? #{"TODO" "DOING"} ?marker)]
 9      [?b :block/scheduled ?d]
10      [(<= ?d ?today)]
11  ]
12  :inputs [:today]
13  :result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/page :block/journal-day])) result))  ; Sort by the journal date
14  :table-view? false
15  :breadcrumb-show? false
16  :collapsed? false
17}
18{
19  :title ["๐Ÿฑ Box" ]
20  :query [:find (pull ?b [*])
21  :where
22    [?p :block/name "bento"] ; name is always lowercase
23    [?b :block/refs ?p] ; this block references ?p as oppose to being on ?p through :block/page.
24    [?b :block/marker "TODO"]
25  ]
26  :result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/page :block/journal-day])) result))  ; Sort by the journal date
27  :table-view? false
28  :breadcrumb-show? false
29  :collapsed? false
30}
31{
32  :title ["๐Ÿฃ Widgets" ]
33  :query [:find (pull ?b [*])
34  :where
35    [?p :block/name "w"] ; name is always lowercase
36    [?b :block/refs ?p] ; this block references ?p as oppose to being on ?p through :block/page.
37    [?b :block/marker "TODO"]
38  ]
39  :result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/page :block/journal-day])) result))  ; Sort by the journal date
40  :table-view? false
41  :breadcrumb-show? false
42  :collapsed? false
43}
44{
45  :title "โŒ› On this day..."
46  :query [:find (pull ?b [*])
47    :in $ ?today
48    :where
49      [?b :block/page ?p]
50      [?p :page/journal? true]
51      [?p :page/journal-day ?jd]     
52      [(str ?jd) ?jds]     
53      [(subs ?jds 4 8) ?md1]
54      [(str ?today) ?td]
55      [(subs ?td 4 8) ?md2]
56      [(= ?md1 ?md2)]
57      [(< ?jd ?today)]
58	]
59	:inputs [:today]
60  :breadcrumb-show? true
61  :collapsed? False
62}  
63]} ; Close :default-queries {:journals

Open TODOs for this page template

Template to use in pages where you want a quick overview of open tasks.

 1template:: Query - Current Page Tasks Advanced
 2#+BEGIN_QUERY
 3{
 4:title [:h2 "Open Tasks <% current page %>"]
 5:query [:find (pull ?b [*])
 6  :in $ ?tag
 7  :where
 8    [?p :block/name ?tag] ; name is always lowercase
 9    [?b :block/refs ?p] ; this block references ?p as oppose to being on ?p through :block/page.
10    [?b :block/marker ?marker]
11    [(contains? #{"TODO" "DOING"} ?marker)]
12  ]
13:inputs [:current-page]
14:result-transform (fn [result] (sort-by (fn [r] (get-in r [:block/page :block/journal-day])) result))  ; Sort by the journal date
15:table-view? false
16:breadcrumb-show? false
17:collapsed? false
18}
19#+END_QUERY