You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Nick Dumas bd3f24f79a it's not much, but it's a start 2 years ago
.github/workflows adding github release workflow 2 years ago
Resources i asked for metadata examples 2 years ago
cmd Cleaning up flag structure 2 years ago
fsm named error types 2 years ago
gloss Implementing lipgloss into help/usage output 2 years ago
tmp/blog/content/posts/mapping-aardwolf first draft 2 years ago
.gitignore Create build artifacts, and ignore them. 2 years ago
LICENSE whatever 2 years ago
Makefile Create build artifacts, and ignore them. 2 years ago
README.md it's not much, but it's a start 2 years ago
attachments.go Refactoring validation code out of cmd/ 2 years ago
blerp.go Refactoring validation code out of cmd/ 2 years ago
go.mod output says validation is successful. more testing needed 2 years ago
go.sum output says validation is successful. more testing needed 2 years ago
notes.go Refactoring validation code out of cmd/ 2 years ago
pipeline.go Refactoring validation code out of cmd/ 2 years ago
posts.go Implementing lipgloss into help/usage output 2 years ago
validate.go Code cleanup for public release 2 years ago

README.md

obsidian-pipeline

Overview

obsidian-pipeline or obp enables headless management of your Obsidian vault.

obp is primarily targeted at users who are programmatically interacting with their vaults, publishing them via static site generators or doing quality control with scheduled tasks.

Features

obp is in pre-release status for now, so the featureset is limited.

obp-linux help
a suite of tools for managing your obsidian vault

Usage:
  obp [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  validate    loads a note and ensures its frontmatter follows the provided protobuf schema

Flags:
      --config string   config file (default "~/.obp.toml")
  -h, --help            help for obp

Additional help topics:
  obp hugo       convert a set of Obsidian notes into a Hugo compatible directory structure

Use "obp [command] --help" for more information about a command.

Validation

Using the validation feature requires that the JSONSchema files are hosted on some HTTP server somewhere. I did this to simplify the code and avoid resolving relative pathing along the dependency tree.

You can find some pre-made schemas here, a site powered by my json-schemas repository. If you would like to submit a schema that you've designed.

Usage

Usage:
  obp validate [flags]

Flags:
      --format string   output format [markdown, json, csv] (default "markdown")
  -h, --help            help for validate
  -s, --schema string   path to protobuf file (default "base.schema")
  -t, --target string   directory containing validation targets

Global Flags:
      --config string   config file (default "~/.obp.toml")

Markdown output can be piped into glow for a little extra pizazz, but JSON is available for programmatic handling.

./bin/obp-linux validate --format markdown -s https://schemas.ndumas.com/obsidian/note.schema.json -t Resou
rces/blog/published/|glow

   Validation Errors for "/home/ndumas/work/obsidian-pipeline/Resources/blog/published/schema-bad-tags.md"

          VALIDATION RULE       │ FAILING PROPERTY │             ERROR
  ──────────────────────────────┼──────────────────┼─────────────────────────────────
    /properties/tags/items/type │ /tags/2          │ expected string, but got
                                │                  │ number

   Validation Errors for "/home/ndumas/work/obsidian-pipeline/Resources/blog/published/schema-bad.md"

          VALIDATION RULE        │ FAILING PROPERTY │             ERROR
  ───────────────────────────────┼──────────────────┼─────────────────────────────────
    /properties/description/type │ /description     │ expected string, but got
                                 │                  │ number
    /properties/tags/type        │ /tags            │ expected array, but got string