# Portabilität: UNIVERSAL
# Version: 1.0.0
# Zuletzt validiert: 2026-03-04

PROFILER
========

Handler für Datei- und Ordner-Analyse im BACH-System.


BESCHREIBUNG
============

Der PROFILER Handler bietet Funktionen zur Analyse und Verwaltung von Dateien:
- Suche nach Dateien mit Keyword-Matching
- Detaillierte Datei- und Ordner-Profile (Größe, Kategorie, Metadaten)
- SHA256-Hash-Berechnung
- Automatische Datei-Kategorisierung (8 vordefinierte Kategorien)
- Ordner-Statistiken mit Größenausgaben nach Dateityp


OPERATIONEN
===========

search <keyword> [--path=DIR] [--type=ext]
  Durchsuche Dateisystem nach Keyword. Max. 50 Treffer.
  Optionen:
    --path=DIR     Suchpfad (default: .)
    --type=ext     Nur Dateityp filtern (z.B. py, txt, json)
  Beispiel: profiler search config --path=. --type=json

profile <path>
  Analysiere Datei oder Ordner. Gibt Größe, Kategorie und Metadaten aus.
  Beispiel: profiler profile data/myfile.txt

hash <path>
  Berechne SHA256-Hash einer Datei.
  Beispiel: profiler hash archive.zip

categorize <path>
  Bestimme automatische Dateikategorie basierend auf Endung.
  Beispiel: profiler categorize document.docx

stats <path>
  Zeige detaillierte Ordner-Statistiken: Dateianzahl, Gesamtgröße,
  Verteilung nach Kategorie mit Speichernutzung.
  Beispiel: profiler stats ./projects

status
  Zeige ProFiler-Status und verfügbare Kategorien.


BEISPIELE
=========

profiler search requirements --path=. --type=txt
  -> Findet bis zu 50 Dateien mit "requirements" im Namen (nur .txt)

profiler profile /home/cfm-cosmology/results
  -> Ordner-Profil: 1243 Dateien, 15.7 GB, 8 Unterordner

profiler hash data/model.pkl
  -> SHA256: a7f8c3e9d... (Dateigröße: 2.3 MB)

profiler categorize config.json
  -> config.json: Daten (.json)

profiler stats ./documents
  -> Ordner-Statistiken mit Kategorisierung (Dokumente: 234 Dateien 456 MB, etc.)

profiler status
  -> ProFiler Status und Kategorien-Übersicht


KATEGORIEN
==========

8 vordefinierte Dateikategorien:

  Dokumente   - .pdf, .doc, .docx, .txt, .odt, .xls, .xlsx, .csv, .pptx
  Bilder      - .jpg, .jpeg, .png, .gif, .bmp, .svg, .webp, .tiff, .ico
  Audio       - .mp3, .wav, .flac, .ogg, .aac, .wma, .m4a
  Video       - .mp4, .avi, .mkv, .mov, .wmv, .flv, .webm
  Archive     - .zip, .rar, .7z, .tar, .gz, .bz2
  Code        - .py, .js, .ts, .html, .css, .java, .c, .cpp, .rs, .go, .sql
  Daten       - .json, .xml, .yaml, .yml, .toml, .ini, .cfg
  Ausführbar - .exe, .msi, .bat, .cmd, .ps1, .sh
  Sonstige    - Alle anderen Endungen


DATEIEN
=======

hub/profiler.py              Handler-Implementation (hub/)
extensions/ProFiler/         Extension-Verzeichnis (optional)


SIEHE AUCH
==========

hub/base.py              - BaseHandler Klasse
docs/help/handler.txt    - Handler-Dokumentation allgemein
