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:
Adrian Altner 2026-04-21 23:17:21 +02:00
parent a123886ee4
commit 0f43bb18cc
24 changed files with 2430 additions and 41 deletions

39
scripts/new-post.sh Executable file
View file

@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Usage: new-post.sh "Post Title"
# Creates a new blog post in the Obsidian vault with correct frontmatter and folder structure.
set -euo pipefail
VAULT='/Users/adrian/Obsidian/Web/adrian-altner-com'
if [[ -z "${1:-}" ]]; then
echo "Usage: new-post.sh \"Post Title\"" >&2
exit 1
fi
TITLE="$1"
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-%dT%H:%M:%S%z)
DIR="$VAULT/content/blog/posts/$DATE_FOLDER"
FILE="$DIR/$SLUG.md"
mkdir -p "$DIR"
if [[ -f "$FILE" ]]; then
echo "File already exists: $FILE" >&2
exit 1
fi
cat > "$FILE" << EOF
---
title: "$TITLE"
description: ""
publishDate: $PUBLISH_DATE
tags:
-
draft: true
syndication:
---
EOF
echo "Created: $FILE"