lggruspe / slipbox

A static site generator for Zettelkasten notes
https://lggruspe.github.io/slipbox
MIT License
57 stars 5 forks source link

`slipbox check`: add data arg to pass data to checkers #24

Open lggruspe opened 1 year ago

lggruspe commented 1 year ago

Is your feature request related to a problem? Please describe. Use case: passing data to a checker. For example, enabling checks only on a specific cluster of notes.

Describe the solution you'd like Here's an example.

slipbox check --enable isolated-note,graph-cycle --data data.json

data.json contains data to pass to the checkers.

{
  "graph-cycle": {
    "tags": ["#foo", "#bar"]
  },
  "isolated-note": {
    "tags": ["#foo", "#bar"]
  }
}

Then the graph-cycle and isolated-note checks will only be applied to the notes with the specified tags.

Describe alternatives you've considered Passing data via config file is another option.

[slipbox]
# omitted ...

[check]
graph-cycle = true
isolated-note = true

[check.graph-cycle]
tags = "#foo,#bar"

[check.isolated-note]
tags = "#foo,#bar"