This commit is contained in:
1 parent
23b1cb2966
commit
e9532e8878
30 files changed
+1835
-542
No files matched your search
@@ -1,15 +1,62 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
scripts/debug_note_payload.py
|
||||
Zeigt, welche app.core.note_payload geladen wird, ruft make_note_payload auf
|
||||
und druckt Typ/Preview der Rückgabe.
|
||||
FILE: scripts/debug_note_payload.py
|
||||
VERSION: 2.1.0 (2025-12-15)
|
||||
STATUS: Active (Debug-Tool)
|
||||
COMPATIBILITY: v2.9.1 (Post-WP14/WP-15b)
|
||||
|
||||
Zweck:
|
||||
-------
|
||||
Debug-Tool zur Analyse der Note-Payload-Erzeugung.
|
||||
Zeigt, welches Modul geladen wird und die erzeugte Payload-Struktur.
|
||||
|
||||
Funktionsweise:
|
||||
---------------
|
||||
1. Lädt Note-Payload-Modul
|
||||
2. Liest Markdown-Datei
|
||||
3. Ruft make_note_payload auf
|
||||
4. Zeigt Modul-Pfad, Rückgabe-Typ und Payload-Inhalt
|
||||
|
||||
Ergebnis-Interpretation:
|
||||
------------------------
|
||||
- Ausgabe: Debug-Informationen
|
||||
* module_path: Pfad zum geladenen Modul
|
||||
* return_type: Typ der Rückgabe
|
||||
* keys: Liste der Payload-Keys (falls Dict)
|
||||
* JSON: Vollständige Payload (falls Dict)
|
||||
|
||||
Verwendung:
|
||||
-----------
|
||||
- Debugging von Payload-Erzeugungsproblemen
|
||||
- Validierung der Modul-Ladung
|
||||
- Analyse der Payload-Struktur
|
||||
|
||||
Hinweise:
|
||||
---------
|
||||
- Nutzt app.core.ingestion.ingestion_note_payload (nicht mehr app.core.note_payload)
|
||||
- Zeigt vollständige Payload-Struktur
|
||||
|
||||
Aufruf:
|
||||
python3 -m scripts.debug_note_payload --file ./test_vault/40_concepts/concept-alpha.md --vault-root ./test_vault
|
||||
-------
|
||||
python3 -m scripts.debug_note_payload --file ./vault/note.md --vault-root ./vault
|
||||
|
||||
Parameter:
|
||||
----------
|
||||
--file PATH Pfad zur Markdown-Datei (erforderlich)
|
||||
--vault-root PATH Vault-Root für relative Pfade (optional)
|
||||
--hash-mode MODE Hash-Modus (optional)
|
||||
--hash-normalize N Hash-Normalisierung (optional)
|
||||
--hash-source SRC Hash-Quelle (optional)
|
||||
|
||||
Änderungen:
|
||||
-----------
|
||||
v2.1.0 (2025-12-15): Kompatibilität mit WP-14 Modularisierung
|
||||
- Geändert: app.core.note_payload → app.core.ingestion.ingestion_note_payload
|
||||
v1.0.0: Initial Release
|
||||
"""
|
||||
import argparse, json, os, pprint
|
||||
from app.core import note_payload as np
|
||||
from app.core.ingestion import ingestion_note_payload as np
|
||||
from app.core.parser import read_markdown
|
||||
|
||||
def main():
|
||||
@@ -24,7 +71,6 @@ def main():
|
||||
print("module_path:", getattr(np, "__file__", "<unknown>"))
|
||||
parsed = read_markdown(args.file)
|
||||
res = np.make_note_payload(parsed, vault_root=args.vault_root,
|
||||
hash_mode=args.hash_mode,
|
||||
hash_normalize=args.hash_normalize,
|
||||
hash_source=args.hash_source,
|
||||
file_path=args.file)
|
||||
|
||||
Reference in new issue
Block a user