No description
  • Go 76.6%
  • Makefile 21.4%
  • Dockerfile 2%
Find a file
Nick Dumas e95c747899
Some checks failed
goreleaser / test (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled
restructuring subcommands for hugo tooling
2023-06-23 09:38:03 -04:00
.github/workflows Adding some failing tests 2023-06-13 08:39:56 -04:00
cmd restructuring subcommands for hugo tooling 2023-06-23 09:38:03 -04:00
fsm named error types 2023-05-01 22:10:34 -04:00
gloss Implementing lipgloss into help/usage output 2023-05-04 13:27:47 -04:00
Resources i asked for metadata examples 2023-06-08 10:26:26 -04:00
tmp/blog/content/posts/mapping-aardwolf first draft 2023-04-28 10:34:43 -04:00
.drone.yml Only build docker images on tags 2023-06-13 14:39:23 -04:00
.gitignore ignore reports 2023-06-12 18:35:06 -04:00
.goreleaser.yaml this IS the final piece 2023-06-09 11:52:28 -04:00
Dockerfile Cleaning up copy command 2023-06-18 22:12:43 -04:00
go.mod Upgrading the makefile in a major way 2023-06-12 18:06:43 -04:00
go.sum Upgrading the makefile in a major way 2023-06-12 18:06:43 -04:00
hugo.go Hugo bundle directory scaffolding 2023-06-22 14:42:36 -04:00
LICENSE whatever 2023-05-03 09:44:34 -04:00
Makefile Cleaning up dockerfile 2023-06-19 23:05:24 -04:00
notes.go Refactoring validation code out of cmd/ 2023-05-17 13:15:40 -04:00
pipeline.go Unit tests and linting cleanup 2023-06-13 14:38:06 -04:00
README.md it's not much, but it's a start 2023-06-09 11:07:00 -04:00
validate.go Not sure why I changed this return statement 2023-06-19 00:15:26 -04:00
validate_test.go adding a positive test case 2023-06-13 15:03:44 -04:00
version.go Finally got versions baked into the builds 2023-06-12 20:38:42 -04:00

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