1.2 KiB
1.2 KiB
VLM Developer Guide
Project Structure
src/vlm/cli.py: Entry point and command definitions.src/vlm/parser.py: Regex-based filename parsing logic.src/vlm/enrichment.py: Pipeline for external metadata fetching.src/vlm/providers/: API implementations (e.g., TMDB).src/vlm/planner.py: Logic for mapping identities to filesystem operations.src/vlm/executor.py: Safe file manipulation and rollback logging.
Adding a New Command
- Create a new module in
src/vlm/commands/. - Define the command using
@click.command(). - Register it in
src/vlm/cli.pyusingmain.add_command().
Modifying the Parser
- The parser uses a sequence of regex patterns in
src/vlm/parser.py. - Add new patterns to the
PATTERNSlist or improve existing ones. - Always run
pytest tests/test_parser.pyafter changes.
Data Models
See src/vlm/models.py for core data structures:
VideoFile: Basic file metadata.MediaIdentity: Parsed and enriched information.PlanOperation: Definition of a file move/rename/quarantine.
Testing
- Unit Tests:
pytest - Property-based Tests:
pytest tests/test_analysis_properties.py(uses Hypothesis). - Integration Tests:
pytest tests/test_reports_integration.py.