chore(scripts): add test-personal-wiki.sh + NUWIKI_DEV_NO_SEED
test-personal-wiki.sh wraps start-vim.sh to open the user's real wiki at ~/.vimwiki/personal_wiki (override with NUWIKI_PERSONAL_WIKI) — used when reproducing user-reported bugs against actual content instead of the seeded smoke-test wiki. Also adds a NUWIKI_DEV_NO_SEED env var to start-vim.sh so seed_wiki doesn't drop a scratch Notes.wiki into the user's real notes when we point WIKI_DIR at an already-populated wiki. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
# ./start-vim.sh path/to/note.wiki # open a specific file
|
||||
# NUWIKI_DEV_WIKI=/tmp/foo ./start-vim.sh
|
||||
# NUWIKI_DEV_NO_LSP=1 ./start-vim.sh # skip vim-lsp setup
|
||||
# NUWIKI_DEV_NO_SEED=1 ./start-vim.sh # use WIKI_DIR as-is (no scratch seeding)
|
||||
# NUWIKI_DEV_SKIP_BUILD=1 ./start-vim.sh # reuse the cached binary
|
||||
#
|
||||
# The release binary is rebuilt on every launch so source changes
|
||||
@@ -77,6 +78,10 @@ ensure_vim_lsp() {
|
||||
}
|
||||
|
||||
seed_wiki() {
|
||||
if [[ "${NUWIKI_DEV_NO_SEED:-0}" == "1" ]]; then
|
||||
log "NUWIKI_DEV_NO_SEED=1 — skipping wiki seed (using $WIKI_DIR as-is)"
|
||||
return
|
||||
fi
|
||||
mkdir -p "$WIKI_DIR" "$WIKI_DIR/diary"
|
||||
if [[ ! -f "$WIKI_DIR/index.wiki" ]]; then
|
||||
cat > "$WIKI_DIR/index.wiki" <<'EOF'
|
||||
|
||||
Reference in New Issue
Block a user