Files
workphone-sdk/open-obsidian.sh
Manus AI a073d95f1c
Some checks failed
SDK CI / python-compile (push) Has been cancelled
chore: GitHub源码文档交接快照 2026-07-19
保留源码与部署文档,排除超大二进制和本地运行配置。
2026-07-19 16:16:14 +08:00

22 lines
682 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# 工作手机 · Obsidian 入口ASCII 路径 symlink避免中文路径卡死
set -euo pipefail
LITE="/Users/karuo/Documents/workphone-devdoc"
FULL="/Users/karuo/Documents/开发/2、私域银行/工作手机"
MODE="${1:-lite}"
# 确保 symlink 存在
ln -sfn "$FULL/开发文档" "$LITE"
osascript -e 'tell application "Obsidian" to quit' 2>/dev/null || true
sleep 1
rm -rf "$HOME/Library/Saved Application State/md.obsidian.savedState" 2>/dev/null || true
if [[ "$MODE" == "full" ]]; then
open -a Obsidian "$FULL"
echo "opened full vault: $FULL"
else
open -a Obsidian "$LITE"
echo "opened lite vault (ASCII path): $LITE -> 开发文档"
fi