Backup automatico script del 2026-08-23 12:04
This commit is contained in:
1 parent
11823447a2
commit
795a15a7b6
66 files changed
+8546
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Crea un progetto demo per ogni utente famiglia."""
|
||||
import sys
|
||||
sys.path.insert(0, "/srv")
|
||||
from app.context import store as context_store
|
||||
|
||||
USERS = {
|
||||
"daniele": "Homelab LOOGLE",
|
||||
"lucia": "Progetti personali",
|
||||
"davide": "Studio e task",
|
||||
"luca": "Progetti Luca",
|
||||
}
|
||||
|
||||
for username, title in USERS.items():
|
||||
root = context_store._user_root(username)
|
||||
existing = context_store.list_projects(username)
|
||||
if existing:
|
||||
print(f"{username}: skip ({len(existing)} progetti)")
|
||||
continue
|
||||
meta = context_store.create_project(username, title, tags=["demo"])
|
||||
context_store.save_context(
|
||||
username,
|
||||
meta["id"],
|
||||
f"Progetto demo iniziale per {username}. Usa save_context per ampliare la memoria agente.",
|
||||
)
|
||||
print(f"{username}: creato {meta['id']}")
|
||||
Reference in new issue
Block a user