chore: auto-commit from dashboard
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"""YouTube subtitle-download + note-creation endpoint."""
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
@@ -10,6 +11,8 @@ from pathlib import Path
|
||||
|
||||
import constants
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _clean_vtt(content):
|
||||
"""Convert VTT captions to plain text."""
|
||||
@@ -101,6 +104,16 @@ def _process_youtube(url):
|
||||
[sys.executable, str(constants.TOOLS_DIR / 'update_notes_index.py')],
|
||||
capture_output=True,
|
||||
)
|
||||
|
||||
# Index new note with Ollama semantic embeddings
|
||||
try:
|
||||
sys.path.insert(0, str(constants.BASE_DIR))
|
||||
from src.memory_search import index_file, MEMORY_DIR
|
||||
n = index_file(note_path)
|
||||
log.info("Ollama indexed %s (%d chunks)", filename, n)
|
||||
except Exception as e:
|
||||
log.warning("Ollama indexing failed for %s: %s", filename, e)
|
||||
|
||||
print(f"Created note: {filename}")
|
||||
return filename
|
||||
|
||||
|
||||
@@ -10,19 +10,10 @@
|
||||
"time": "30 Jan 2026, 22:00"
|
||||
},
|
||||
"anaf": {
|
||||
"ok": false,
|
||||
"status": "MODIFICĂRI",
|
||||
"message": "1 modificări detectate",
|
||||
"lastCheck": "24 Apr 2026, 10:00",
|
||||
"changesCount": 1,
|
||||
"changes": [
|
||||
{
|
||||
"name": "Declarația 100 - Obligații de plată la bugetul de stat",
|
||||
"url": "https://static.anaf.ro/static/10/Anaf/Declaratii_R/100.html",
|
||||
"summary": [
|
||||
"Soft J: 07.04.2026 → 23.04.2026"
|
||||
]
|
||||
}
|
||||
]
|
||||
"ok": true,
|
||||
"status": "OK",
|
||||
"message": "Nicio modificare detectată",
|
||||
"lastCheck": "24 Apr 2026, 16:00",
|
||||
"changesCount": 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user