Coverage for src / local_deep_research / exporters / __init__.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-02-25 01:07 +0000

1"""Document exporters package. 

2 

3This package provides a modular system for exporting research reports 

4to various document formats (PDF, ODT, LaTeX, etc.). 

5 

6Example usage: 

7 from local_deep_research.exporters import ExporterRegistry, ExportOptions 

8 

9 # Get an exporter 

10 exporter = ExporterRegistry.get_exporter("pdf") 

11 

12 # Export content 

13 options = ExportOptions(title="My Research Report") 

14 result = exporter.export(markdown_content, options) 

15 

16 # Use the result - content is available in memory as bytes 

17 # result.content contains the file bytes 

18 # result.filename is the suggested filename 

19 # result.mimetype is the MIME type for HTTP responses 

20 

21Available formats can be queried with: 

22 ExporterRegistry.get_available_formats() 

23""" 

24 

25from .base import BaseExporter, ExportOptions, ExportResult 

26from .registry import ExporterRegistry 

27 

28# Import all exporters to trigger registration 

29# These imports must come after the base and registry imports 

30from . import latex_exporter # noqa: F401 

31from . import odt_exporter # noqa: F401 

32from . import pdf_exporter # noqa: F401 

33from . import quarto_exporter # noqa: F401 

34from . import ris_exporter # noqa: F401 

35 

36__all__ = [ 

37 "BaseExporter", 

38 "ExportOptions", 

39 "ExportResult", 

40 "ExporterRegistry", 

41]