Resolve merge conflicts - keep local plugin versions and settings
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+17
-2
@@ -1,8 +1,23 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
||||
"permissions": {
|
||||
"allow": [],
|
||||
"allow": [
|
||||
"Bash(npm run | grep daily-note)",
|
||||
"Edit(06_Metadata/Templates/Daily Note Template.md)",
|
||||
"Edit(06_Metadata/Reference/DAILY_NOTE_GUIDE.md)",
|
||||
"Edit(.obsidian/plugins/quickadd/data.json)",
|
||||
"Edit(04_Archive/Projects/Airport/Chengdu/Office Test Env.md)",
|
||||
"Bash(wc:*)",
|
||||
"Bash(cat > .replace_urls.py << 'PYEOF'\n#!/usr/bin/env python3\nimport re\n\n# Read the mapping\nmappings = []\nwith open('.url_mapping.txt', 'r') as f:\n for line in f:\n if '|' in line:\n url, filename = line.strip().split('|', 1)\n mappings.append((url, filename))\n\n# Read the markdown file\nnote_path = \"00_Inbox/Clippings/2026/01/ZeroLuawesome-nanobanana-pro 🚀 An awesome list of curated Nano Banana pro prompts and examples. Your go-to resource for mastering prompt engineering and exploring the creative potential of the Nano banana pro(Nano banana 2) AI image model..md\"\n\nwith open(note_path, 'r', encoding='utf-8') as f:\n content = f.read()\n\n# Perform replacements\nreplacements_made = 0\nfor url, filename in mappings:\n # Escape special regex characters in URL\n escaped_url = re.escape(url)\n # Replace markdown image syntax:  -> ![[path/filename]]\n pattern = r'!\\[([^\\]]*)\\]\\(' + escaped_url + r'\\)'\n replacement = f'![[05_Attachments/nanobanana-pro/{filename}]]'\n new_content, count = re.subn(pattern, replacement, content)\n if count > 0:\n content = new_content\n replacements_made += count\n print(f\"✓ Replaced {count}x: {filename}\")\n\n# Write back\nwith open(note_path, 'w', encoding='utf-8') as f:\n f.write(content)\n\nprint(f\"\\nTotal replacements: {replacements_made}\")\nPYEOF\npython3 .replace_urls.py)",
|
||||
"Bash(cat > .fix_links.py << 'PYEOF'\n#!/usr/bin/env python3\nimport re\n\nnote_path = \"00_Inbox/Clippings/2026/01/ZeroLuawesome-nanobanana-pro 🚀 An awesome list of curated Nano Banana pro prompts and examples. Your go-to resource for mastering prompt engineering and exploring the creative potential of the Nano banana pro(Nano banana 2) AI image model..md\"\n\nwith open(note_path, 'r', encoding='utf-8') as f:\n content = f.read()\n\n# Pattern: [![[wikilink]]](url) -> ![[wikilink]]\n# Remove the clickable link wrapper around wikilinks\npattern = r'\\[(!\\[\\[05_Attachments/nanobanana-pro/[^\\]]+\\]\\])\\]\\([^)]+\\)'\nreplacement = r'\\1'\nnew_content, count = re.subn(pattern, replacement, content)\n\nprint(f\"Fixed {count} clickable link wrappers\")\n\nwith open(note_path, 'w', encoding='utf-8') as f:\n f.write(new_content)\nPYEOF\npython3 .fix_links.py)",
|
||||
"Bash(ls -lh 05_Attachments/nanobanana-pro/ | awk '{if ($5 ~ /^[0-9]+$/ && $5 < 1024) print $9, $5}' | head -20)",
|
||||
"Bash(find:*)",
|
||||
"Bash(find 05_Attachments/nanobanana-pro/ -type f \\( -size 0 -o -size -100c \\) | sort > .failed_images.txt && head -10 .failed_images.txt)",
|
||||
"Bash(cat > .fix_conflicts.py << 'EOF'\n#!/usr/bin/env python3\nimport re\n\n# Read the file\nwith open\\('.obsidian/plugins/claudian/main.js', 'r'\\) as f:\n content = f.read\\(\\)\n\n# Fix first conflict \\(line ~2076\\) - use origin/main version \\(simpler path\\)\npattern1 = r'<<<<<<< HEAD\\\\n// node_modules/@modelcontextprotocol/sdk/node_modules/ajv/node_modules/json-schema-traverse/index\\\\.js\\\\nvar require_json_schema_traverse = __commonJS\\\\\\(\\\\{\\\\n \"node_modules/@modelcontextprotocol/sdk/node_modules/ajv/node_modules/json-schema-traverse/index\\\\.js\"\\\\\\(exports, module2\\\\\\) \\\\{\\\\n=======\\\\n// node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse/index\\\\.js\\\\nvar require_json_schema_traverse = __commonJS\\\\\\(\\\\{\\\\n \"node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse/index\\\\.js\"\\\\\\(exports, module2\\\\\\) \\\\{\\\\n>>>>>>> origin/main'\n\nreplacement1 = '''// node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse/index.js\nvar require_json_schema_traverse = __commonJS\\({\n \"node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse/index.js\"\\(exports, module2\\) {'''\n\ncontent = re.sub\\(pattern1, replacement1, content\\)\n\n# Fix second conflict \\(line ~8693\\) - use origin/main version \\(simpler path\\)\npattern2 = r'<<<<<<< HEAD\\\\n// node_modules/ajv-formats/node_modules/ajv/node_modules/json-schema-traverse/index\\\\.js\\\\nvar require_json_schema_traverse2 = __commonJS\\\\\\(\\\\{\\\\n \"node_modules/ajv-formats/node_modules/ajv/node_modules/json-schema-traverse/index\\\\.js\"\\\\\\(exports, module2\\\\\\) \\\\{\\\\n=======\\\\n// node_modules/ajv-formats/node_modules/json-schema-traverse/index\\\\.js\\\\nvar require_json_schema_traverse2 = __commonJS\\\\\\(\\\\{\\\\n \"node_modules/ajv-formats/node_modules/json-schema-traverse/index\\\\.js\"\\\\\\(exports, module2\\\\\\) \\\\{\\\\n>>>>>>> origin/main'\n\nreplacement2 = '''// node_modules/ajv-formats/node_modules/json-schema-traverse/index.js\nvar require_json_schema_traverse2 = __commonJS\\({\n \"node_modules/ajv-formats/node_modules/json-schema-traverse/index.js\"\\(exports, module2\\) {'''\n\ncontent = re.sub\\(pattern2, replacement2, content\\)\n\n# Write back\nwith open\\('.obsidian/plugins/claudian/main.js', 'w'\\) as f:\n f.write\\(content\\)\n\nprint\\(\"✓ Fixed both conflicts in main.js\"\\)\nEOF\npython3 .fix_conflicts.py)",
|
||||
"Bash(git add:*)",
|
||||
"Bash(git commit -m \"$\\(cat <<''EOF''\nMerge branch ''origin/main'' into main\n\nResolved conflicts in:\n- .claude/settings.json \\(kept local permissions\\)\n- .obsidian/community-plugins.json \\(merged both plugin lists\\)\n- .obsidian/plugins/obsidian-excalidraw-plugin/manifest.json \\(kept newer version 2.20.2\\)\n- .obsidian/plugins/claudian/main.js \\(used simpler dependency paths\\)\n\nCo-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>\nEOF\n\\)\")"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user