Add deployment scripts for blog, links, notes, photos, and projects; implement history squashing and vision processing
- Created `publish-blog.sh`, `publish-links.sh`, `publish-notes.sh`, `publish-photos.sh`, and `publish-projects.sh` for deploying respective content to the VPS. - Implemented `squash-history.sh` to replace the entire git history with a single commit. - Added `vision.ts` and `vision.spec.ts` for processing images with AI, including metadata extraction and merging. - Enhanced error handling and logging in vision processing scripts.
This commit is contained in:
parent
a123886ee4
commit
0f43bb18cc
24 changed files with 2430 additions and 41 deletions
40
scripts/new-note-mdx-prompt.sh
Executable file
40
scripts/new-note-mdx-prompt.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
# Standalone wrapper für Obsidian Script Runner — neue Note mit Cover-Bild (MDX)
|
||||
set -euo pipefail
|
||||
|
||||
VAULT='/Users/adrian/Obsidian/Web/adrian-altner-com'
|
||||
|
||||
TITLE=$(osascript \
|
||||
-e 'Tell application "System Events" to display dialog "Note title (with cover):" default answer ""' \
|
||||
-e 'text returned of result' 2>/dev/null) || exit 0
|
||||
|
||||
if [[ -z "$TITLE" ]]; then exit 0; fi
|
||||
|
||||
SLUG=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9 -]//g' | sed 's/ \+/-/g' | sed 's/^-\+//;s/-\+$//')
|
||||
DATE_FOLDER=$(date +%Y/%m/%d)
|
||||
PUBLISH_DATE=$(date +%Y-%m-%d)
|
||||
DIR="$VAULT/content/notes/$DATE_FOLDER"
|
||||
FILE="$DIR/$SLUG.mdx"
|
||||
|
||||
mkdir -p "$DIR"
|
||||
|
||||
if [[ -f "$FILE" ]]; then
|
||||
osascript -e "display notification \"File already exists: $SLUG.mdx\" with title \"New Note\"" 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat > "$FILE" << EOF
|
||||
---
|
||||
title: "$TITLE"
|
||||
publishDate: $PUBLISH_DATE
|
||||
description: ""
|
||||
cover: "./$SLUG.jpg"
|
||||
coverAlt: ""
|
||||
tags:
|
||||
-
|
||||
draft: false
|
||||
syndication:
|
||||
---
|
||||
EOF
|
||||
|
||||
echo "Created: $FILE"
|
||||
Loading…
Add table
Add a link
Reference in a new issue