Last active
March 13, 2023 00:09
-
-
Save abul4fia/386acace9442048db6b608cf7efc0b42 to your computer and use it in GitHub Desktop.
Planificación con Logseq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Añadir esta línea para que se pueda colapsar un párrafo dejando visible | |
;; solo su primera línea | |
:outliner/block-title-collapse-enabled? true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Para tener resultados de queries más compactos, elimino el botón | |
que muestra el contador de resultados y que permite colapsarlos (pues | |
a fin de cuentas se pueden colapsar igual desde el título) */ | |
.custom-query .flex.flex-row.items-center { | |
display: none; | |
} | |
/* También reduzco espacio en la cabecera del botón "Table view" | |
y añado tenue línea separadora */ | |
.custom-query .flex.flex-row.align-items.mt-2 { | |
margin: 0pt; | |
margin-top: -1em; | |
margin-bottom: 1ex; | |
border-bottom: .5pt solid #d0d0f040; | |
opacity: 0.3; /* Esto lo hace más invisible, para que no estorbe visualmente */ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- ## 🔥 Tareas ==vencidas== | |
query-table:: false | |
#+BEGIN_QUERY | |
{ | |
:query [ | |
:find (pull ?block [*]) | |
:in $ ?today | |
:where | |
[?block :block/marker ?m] | |
[(contains? #{"TODO"} ?m)] | |
(or [?block :block/deadline ?d]) | |
[(< ?d ?today)] | |
] | |
:result-transform (fn [result] | |
(sort-by (fn [d] (get d :block/deadline) | |
) result)) | |
:inputs [:today] | |
:breadcrumb-show? false | |
:collapsed? false | |
} | |
#+END_QUERY | |
- ## ⏰ Tareas o notas para hoy | |
query-table:: false | |
#+BEGIN_QUERY | |
{ | |
:query [ | |
:find (pull ?block [*]) | |
:in $ ?start ?next | |
:where | |
(or-join [?block ?start ?next] | |
(and | |
[?block :block/marker ?m] | |
[(contains? #{"TODO"} ?m)] | |
(or [?block :block/scheduled ?d] [?block :block/deadline ?d]) | |
[(>= ?d ?start)] | |
[(<= ?d ?next)] | |
) | |
;; 2nd case: the date linked from the block is in the 7day window | |
(and | |
[?block :block/refs ?p] | |
[?p :block/journal? true] | |
[?p :block/journal-day ?d] | |
[(>= ?d ?start)] | |
[(<= ?d ?next)] | |
) | |
) | |
] | |
:result-transform (fn [result] | |
(sort-by (fn [d] (or (get (get d :block/ref-pages) :page/journal-day) | |
(get d :block/scheduled) | |
(get d :block/deadline) | |
)) result)) | |
:inputs [:today :today] | |
:breadcrumb-show? false | |
:collapsed? false | |
} | |
#+END_QUERY | |
- ## 📆 Tareas o notas para mañana | |
query-table:: false | |
#+BEGIN_QUERY | |
{ | |
:query [ | |
:find (pull ?block [*]) | |
:in $ ?start ?next | |
:where | |
(or-join [?block ?start ?next] | |
(and | |
[?block :block/marker ?m] | |
[(contains? #{"TODO"} ?m)] | |
(or [?block :block/scheduled ?d] [?block :block/deadline ?d]) | |
[(>= ?d ?start)] | |
[(<= ?d ?next)] | |
) | |
;; 2nd case: the date linked from the block is in the 7day window | |
(and | |
[?block :block/refs ?p] | |
[?p :block/journal? true] | |
[?p :block/journal-day ?d] | |
[(>= ?d ?start)] | |
[(<= ?d ?next)] | |
) | |
) | |
] | |
:result-transform (fn [result] | |
(sort-by (fn [d] (or (get (get d :block/ref-pages) :page/journal-day) | |
(get d :block/scheduled) | |
(get d :block/deadline) | |
)) result)) | |
:inputs [:tomorrow :tomorrow] | |
:breadcrumb-show? false | |
:collapsed? false | |
} | |
#+END_QUERY | |
- ## 📅 Tareas o notas para el resto de la semana | |
query-table:: false | |
#+BEGIN_QUERY | |
{ | |
:query [ | |
:find (pull ?block [* {:block/refs [:block/journal-day]}]) | |
:in $ ?start ?next | |
:where | |
(or-join [?block ?start ?next] | |
(and | |
[?block :block/marker ?m] | |
[(contains? #{"TODO"} ?m)] | |
(or [?block :block/scheduled ?d] [?block :block/deadline ?d]) | |
[(>= ?d ?start)] | |
[(<= ?d ?next)] | |
) | |
;; 2nd case: the date linked from the block is in the time window | |
(and | |
[?block :block/refs ?p] | |
[?p :block/journal? true] | |
[?p :block/journal-day ?d] | |
[(>= ?d ?start)] | |
[(<= ?d ?next)] | |
) | |
) | |
] | |
:result-transform (fn [result] | |
(sort-by (fn [d] | |
(get d :block/deadline | |
(get d :block/scheduled | |
(get (last (get d :block/refs)) :block/journal-day | |
99999999999))) | |
) | |
result)) | |
:inputs [:2d-after :7d-after] | |
;; :view (fn [result] (for [r result] [:pre (pr-str r)])) | |
:breadcrumb-show? false | |
:collapsed? false | |
} | |
#+END_QUERY | |
- ## 🗒 Tareas "sin día" | |
query-sort-by:: block | |
query-table:: false | |
query-sort-desc:: true | |
#+BEGIN_QUERY | |
{ | |
:query [ | |
:find (pull ?block [*]) | |
:where | |
[?block :block/marker ?m] | |
[(contains? #{"TODO"} ?m)] | |
(not [?block :block/scheduled ?d]) | |
(not [?block :block/deadline ?d]) | |
] | |
:breadcrumb-show? true | |
:collapsed? false | |
} | |
#+END_QUERY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment