Add multi-account OAuth, Obsidian integration, product assets, and test tooling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
36
scripts/archive-kimi-session.sh
Executable file
36
scripts/archive-kimi-session.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# archive-kimi-session.sh
|
||||
# Quick wrapper to archive the most recent Kimi Code session to Obsidian.
|
||||
#
|
||||
# Usage:
|
||||
# ./archive-kimi-session.sh [topic]
|
||||
#
|
||||
# Examples:
|
||||
# ./archive-kimi-session.sh hermes-mcp-oauth-fix
|
||||
# ./archive-kimi-session.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PYTHON_SCRIPT="$SCRIPT_DIR/kimi-session-to-obsidian.py"
|
||||
SESSIONS_DIR="$HOME/.kimi/sessions"
|
||||
|
||||
# Find the most recently modified session directory
|
||||
if [ ! -d "$SESSIONS_DIR" ]; then
|
||||
echo "Error: Kimi sessions directory not found at $SESSIONS_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LATEST_SESSION=$(ls -t "$SESSIONS_DIR" | head -n 1)
|
||||
|
||||
if [ -z "$LATEST_SESSION" ]; then
|
||||
echo "Error: No Kimi sessions found in $SESSIONS_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TOPIC="${1:-$LATEST_SESSION}"
|
||||
|
||||
echo "Archiving session: $LATEST_SESSION"
|
||||
echo "Topic: $TOPIC"
|
||||
|
||||
python3 "$PYTHON_SCRIPT" "$LATEST_SESSION" "$TOPIC"
|
||||
Reference in New Issue
Block a user