From 55d389e2d196d1ccd49446f5054b3912b20965de Mon Sep 17 00:00:00 2001 From: JMARyA Date: Fri, 8 Mar 2024 22:32:08 +0100 Subject: [PATCH] add scripts --- scripts/show_notes_without_rev.sh | 3 +++ scripts/validate_schema.sh | 5 +++++ 2 files changed, 8 insertions(+) create mode 100755 scripts/show_notes_without_rev.sh create mode 100755 scripts/validate_schema.sh diff --git a/scripts/show_notes_without_rev.sh b/scripts/show_notes_without_rev.sh new file mode 100755 index 0000000..33cf102 --- /dev/null +++ b/scripts/show_notes_without_rev.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mdq -c file.title:Title -c file.path:Path -f '{"rev": {"$exists": false}}' . diff --git a/scripts/validate_schema.sh b/scripts/validate_schema.sh new file mode 100755 index 0000000..15aaee1 --- /dev/null +++ b/scripts/validate_schema.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +mdq -c file.path --noheader . | while IFS= read -r md; do + mdlint --ignore-missing-frontmatter "schema.json" "$md" +done