File size: 1,454 Bytes
7500ff7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
"""Create _Index.md folder notes in each major directory."""
import os

ROOT = r'C:\Users\Admin\Quillan-Ronin'
LINK = '\n- [[system prompts/Quillan-Samurai.md]]\n- [[00 - Meta/00 - Vault Index.md]]\n'

# Directories that need folder notes
dirs = ['scripts', '_dev', 'Quillan Knowledge files', 'Formal Papers', 
        'Skills', 'Platforms', 'system prompts', 'Audio Engineer', 
        'Book Series', 'testing', 'Misc', '00 - Meta', '00 - Templates',
        'training_data', 'training_logs', 'checkpoints',
        '_projects/Ronin-Saga-Neo-Eden', '_projects/Python-Monsters']

for d in dirs:
    base = os.path.join(ROOT, d)
    if not os.path.exists(base):
        print(f'SKIP (not found): {d}')
        continue
    
    # Build listing
    entries = []
    for f in sorted(os.listdir(base)):
        fp = os.path.join(base, f)
        if os.path.isdir(fp) and not f.startswith('.'):
            entries.append(f'  - **{f}/**')
        elif os.path.isfile(fp) and not f.startswith('.'):
            entries.append(f'  - [[{d}/{f}]]')
    
    # Create the _Index.md
    content = f'# {d}\n\n'
    content += f'Folder note for `{d}/` — {len(entries)} entries.\n{LINK}\n'
    content += '\n'.join(entries) + '\n'
    
    idx_path = os.path.join(base, '_Index.md')
    with open(idx_path, 'w', encoding='utf-8') as fh:
        fh.write(content)
    print(f'Created: {d}/_Index.md ({len(entries)} entries)')

print('\nDone!')