Dashboard v2: remove old Kanban, add Status bar, collapsible sections

- Added Status bar from old kanban (ANAF, Git, Cron)
- All sections now collapsible (Status, Activity, Issues)
- Removed Kanban from navigation
- Removed kanban.html file
- Status bar collapsed by default
This commit is contained in:
Echo
2026-01-30 19:02:20 +00:00
parent b0d7bd0a08
commit e3f0708331
7 changed files with 559 additions and 1072 deletions

View File

@@ -2,6 +2,7 @@
"""
Generează index.json pentru notes din fișierele .md
Extrage titlu, dată, tags, și domenii (@work, @health, etc.)
Scanează TOATE subdirectoarele din notes/ (youtube, retete, etc.)
"""
import os
@@ -9,8 +10,11 @@ import re
import json
from pathlib import Path
NOTES_DIR = Path(__file__).parent.parent / "notes" / "youtube"
INDEX_FILE = NOTES_DIR / "index.json"
NOTES_ROOT = Path(__file__).parent.parent / "notes"
INDEX_FILE = NOTES_ROOT / "index.json"
# Subdirectoare de scanat (adaugă altele aici)
SCAN_DIRS = ['youtube', 'retete']
# Domenii de agenți
VALID_DOMAINS = ['work', 'health', 'growth', 'sprijin', 'scout']
@@ -66,27 +70,43 @@ def extract_metadata(filepath):
}
def generate_index():
"""Generează index.json din toate fișierele .md"""
"""Generează index.json din toate fișierele .md din toate subdirectoarele"""
notes = []
# Stats per domeniu
domain_stats = {d: 0 for d in VALID_DOMAINS}
# Stats per categorie
category_stats = {}
for filepath in sorted(NOTES_DIR.glob("*.md"), reverse=True):
if filepath.name == 'index.json':
for subdir in SCAN_DIRS:
notes_dir = NOTES_ROOT / subdir
if not notes_dir.exists():
print(f" (skipping {subdir}/ - not found)")
continue
try:
metadata = extract_metadata(filepath)
notes.append(metadata)
# Update domain stats
for d in metadata['domains']:
domain_stats[d] += 1
domains_str = ' '.join([f'@{d}' for d in metadata['domains']]) if metadata['domains'] else '(no domain)'
print(f" + {metadata['title'][:40]}... {domains_str}")
except Exception as e:
print(f" ! Error processing {filepath.name}: {e}")
print(f"Scanning notes/{subdir}/...")
category_stats[subdir] = 0
for filepath in sorted(notes_dir.glob("*.md"), reverse=True):
if filepath.name == 'index.json':
continue
try:
metadata = extract_metadata(filepath)
# Adaugă categoria (subdirectorul)
metadata['category'] = subdir
# Modifică path-ul fișierului să includă subdirectorul
metadata['file'] = f"{subdir}/{filepath.name}"
notes.append(metadata)
# Update stats
category_stats[subdir] += 1
for d in metadata['domains']:
domain_stats[d] += 1
domains_str = ' '.join([f'@{d}' for d in metadata['domains']]) if metadata['domains'] else ''
print(f" + {metadata['title'][:40]}... {domains_str}")
except Exception as e:
print(f" ! Error processing {filepath.name}: {e}")
# Sortează după dată descrescător
notes.sort(key=lambda x: x['date'], reverse=True)
@@ -96,9 +116,11 @@ def generate_index():
"notes": notes,
"stats": {
"total": len(notes),
"by_domain": domain_stats
"by_domain": domain_stats,
"by_category": category_stats
},
"domains": VALID_DOMAINS
"domains": VALID_DOMAINS,
"categories": SCAN_DIRS
}
with open(INDEX_FILE, 'w', encoding='utf-8') as f:
@@ -106,8 +128,8 @@ def generate_index():
print(f"\n✅ Generated {INDEX_FILE} with {len(notes)} notes")
print(f" Domains: {domain_stats}")
print(f" Categories: {category_stats}")
return output
if __name__ == "__main__":
print("Scanning notes/youtube/...")
generate_index()