Make memory directory configurable (#290)

This commit is contained in:
Dave Morin
2026-04-21 07:04:38 -07:00
committed by GitHub
parent 3107325443
commit 5269806a75
5 changed files with 62 additions and 15 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ if [ $# -eq 0 ]; then
fi
TOPIC="$*"
SLUG=$(echo "$TOPIC" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//' | sed 's/-$//')
DIR="$HOME/Documents/Last30Days"
LAST30DAYS_MEMORY_DIR="${LAST30DAYS_MEMORY_DIR:-$HOME/Documents/Last30Days}"
DIR="$LAST30DAYS_MEMORY_DIR"
DATE=$(date +%Y-%m-%d)
echo "=============================================="
+2 -2
View File
@@ -125,8 +125,8 @@ def emit_output(report: schema.Report, emit: str, fun_level: str = "medium", sav
def compute_save_path_display(save_dir: str, topic: str, suffix: str, emit: str) -> str:
"""Compute the user-friendly save path string that will be shown in the footer.
Uses ~ for the home directory so the footer reads "~/Documents/Last30Days/slug-raw.md"
instead of an absolute machine-local path.
Uses ~ when the saved file is under the user's home directory; otherwise
returns the absolute path.
"""
from pathlib import Path as _Path
path = _Path(save_dir).expanduser().resolve()