"""
Information Composer - A comprehensive toolkit for collecting, composing, and filtering
information from various web resources with AI-powered markdown processing.
This package provides tools for:
- PDF validation and processing
- Markdown conversion and manipulation
- Academic paper downloading and management
- PubMed database integration
- Web scraping from various academic sites
- LLM-based content filtering
"""

from typing import TYPE_CHECKING

# Import all modules
from . import core, crossref, llm_filter, markdown, pdf, pubmed, sites
from .core.doi_downloader import DOIDownloader

# Import key classes for easy access
from .core.utils import clean_doi
from .crossref.core.client import (
    CrossrefAPIError,
    CrossrefClient,
    CrossrefRateLimitExceeded,
    query_crossref,
)
from .crossref.core.models import CrossrefWork
from .markdown.markdown import dictify, jsonify, markdownify
from .pdf.validator import PDFValidator
from .pubmed.pubmed import (
    doi_to_pmid,
    doi_to_pmid_batch,
    load_pubmed_file,
    pmid_batch_to_crossref,
    pmid_to_crossref,
    pmid_to_crossref_work,
    pmid_to_doi,
    pmid_to_doi_batch,
    query_pmid,
)
from .sites.base import BaseSiteCollector
from .sites.google_scholar.models import GoogleScholarPaper, SearchConfig, SearchResult
from .sites.ricedatacn_gene_parser import RiceGeneParser


if TYPE_CHECKING:
    from .llm_filter.core.filter import MarkdownFilter as LLMFilter

__version__ = "0.3.0"
__author__ = "Information Composer Team"
__email__ = "info@information-composer.dev"
__all__ = [
    # Sites utilities
    "BaseSiteCollector",
    # Crossref utilities
    "CrossrefAPIError",
    "CrossrefClient",
    "CrossrefRateLimitExceeded",
    "CrossrefWork",
    # Core classes
    "DOIDownloader",
    "GoogleScholarPaper",
    # Type hints
    "LLMFilter",
    "PDFValidator",
    "RiceGeneParser",
    "SearchConfig",
    "SearchResult",
    "clean_doi",
    # Package modules
    "core",
    "crossref",
    # Markdown utilities
    "dictify",
    # PubMed utilities
    "doi_to_pmid",
    "doi_to_pmid_batch",
    "jsonify",
    "llm_filter",
    "load_pubmed_file",
    "markdown",
    "markdownify",
    "pdf",
    "pmid_batch_to_crossref",
    "pmid_to_crossref",
    "pmid_to_crossref_work",
    "pmid_to_doi",
    "pmid_to_doi_batch",
    "pubmed",
    "query_crossref",
    "query_pmid",
    "sites",
]
