-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (20 loc) 路 982 Bytes
/
Copy pathmain.py
File metadata and controls
26 lines (20 loc) 路 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
Main entry point for the Docling Document Converter application.
Follows SOLID principles with dependency injection and clean architecture.
"""
from services.conversion_service import ConversionService, DoclingDocumentConverter, MarkItDownDocumentConverter
from services.file_service import FileService
from presenters.converter_presenter import DocumentConverterPresenter
def main():
"""Application entry point with dependency injection."""
# Create service instances (following Dependency Inversion Principle)
docling_converter = DoclingDocumentConverter()
markitdown_converter = MarkItDownDocumentConverter()
file_service = FileService()
conversion_service = ConversionService(docling_converter, markitdown_converter, file_service)
# Create presenter with injected dependencies
presenter = DocumentConverterPresenter(conversion_service, file_service)
# Start the application
presenter.run()
if __name__ == "__main__":
main()