Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.4 KB
Raw Blame
"""Document exporters package.

This package provides a modular system for exporting research reports
to various document formats (PDF, ODT, LaTeX, etc.).

Example usage:
    from local_deep_research.exporters import ExporterRegistry, ExportOptions

    # Get an exporter
    exporter = ExporterRegistry.get_exporter("pdf")

    # Export content
    options = ExportOptions(title="My Research Report")
    result = exporter.export(markdown_content, options)

    # Use the result - content is available in memory as bytes
    # result.content contains the file bytes
    # result.filename is the suggested filename
    # result.mimetype is the MIME type for HTTP responses

Available formats can be queried with:
    ExporterRegistry.get_available_formats()
"""

from loguru import logger

from .base import BaseExporter, ExportOptions, ExportResult
from .registry import ExporterRegistry

# Import all exporters to trigger registration
# These imports must come after the base and registry imports
from . import latex_exporter  # noqa: F401
from . import odt_exporter  # noqa: F401

try:
    from . import pdf_exporter  # noqa: F401
except (ImportError, OSError):
    logger.warning(
        "PDF exporter could not be loaded — PDF export will be unavailable"
    )

from . import quarto_exporter  # noqa: F401
from . import ris_exporter  # noqa: F401

__all__ = [
    "BaseExporter",
    "ExportOptions",
    "ExportResult",
    "ExporterRegistry",
]