Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pengx17/logseq-plugin-todo-master

A simple plugin to render a progress bar to gather the overall progress of the TODO markers based on the rendering position.
https://github.com/pengx17/logseq-plugin-todo-master

logseq logseq-plugin

Last synced: 3 months ago
JSON representation

A simple plugin to render a progress bar to gather the overall progress of the TODO markers based on the rendering position.

Awesome Lists containing this project

README

        

# Logseq Plugin TODO Master

A simple plugin to render a progress bar to gather the overall progress of the TODO markers based on the rendering position.

![](./legend.png)

## Usage

Use slash command `[TODO Master] Add Progress Bar` to add a progress bar macro `{{renderer :todomaster}}` .
The progress will be calculated based on the position of the macro.

- If the macro has children blocks, it will show the progress of the children blocks
- If the macro is at the root of the page (without a parent block) and has no children blocks, it will show the progress of the current page
- If the macro is rendering in a block which has a query block, it will show the progress of the query block

### Tips

Since this macro `{{renderer :todomaster}}` will display progress based on the rendering block, you can place it in the journal template, or in a query block title. Here are some examples:

#### Add TODO Master into the page's properties

```md
progress:: {{renderer :todomaster}}
```

#### Add TODO Master into the query block's title

```clojure
#+BEGIN_QUERY
{:title "{{renderer :todomaster}}"
:query [:find (pull ?h [*])
:in $ ?start ?next
:where
[?h :block/marker ?marker]
[?h :block/refs ?p]
[?p :block/journal? true]
[?p :block/journal-day ?d]
[(> ?d ?start)]
[(< ?d ?next)]]
:inputs [:today :7d-after]
:collapsed? false}
#+END_QUERY
```