"""
Scientific Gallery Generator

A Python package for creating responsive HTML galleries from scientific plot
collections. Supports PDF to PNG conversion, hierarchical directory structures,
and can be used programmatically or via CLI.

Example usage:
    from gallery import generate, GalleryConfig, GallerySource

    config = GalleryConfig(
        web_folder="/path/to/output",
        sources=[
            GallerySource(name="plots", path="/path/to/plots"),
        ]
    )

    success = generate(config, verbose=True)
"""

__version__ = "0.2.0"
__author__ = "K. Schmidt"

from gallery.api import generate
from gallery.builder import build_gallery, get_template
from gallery.config import (
    GalleryConfig,
    GalleryDefaults,
    GallerySource,
)
from gallery.utils.datetime_utils import (
    datetime_from_timestamp,
    strftime_filter,
)
from gallery.utils.metadata import (
    load_folder_metadata,
    load_metadata_file,
    merge_metadata,
    resolve_metadata_for_plot,
    save_metadata_cache,
)
from gallery.utils.processing import (
    convert_pdf_to_png,
    needs_update,
    process_plot_files,
    render_gallery_page,
)

# Export utility functions for testing and advanced usage
from gallery.utils.stats import (
    calculate_directory_stats,
    format_file_size,
)

__all__ = [
    "generate",
    "GalleryConfig",
    "GallerySource",
    "GalleryDefaults",
    # Utilities
    "calculate_directory_stats",
    "format_file_size",
    "convert_pdf_to_png",
    "needs_update",
    "process_plot_files",
    "render_gallery_page",
    "load_folder_metadata",
    "merge_metadata",
    "save_metadata_cache",
    "load_metadata_file",
    "resolve_metadata_for_plot",
    "build_gallery",
    "get_template",
    "datetime_from_timestamp",
    "strftime_filter",
]
