Files
lars 7fdb1a200f
Publish plotstyle / build-and-publish (push) Failing after 9s
CI / test:pytest (push) Successful in 20s
CI / lint:ruff (push) Successful in 14s
CI / format:ruff (push) Successful in 17s
CI / typecheck:ty (push) Successful in 15s
CI / vulnerabilities:pip-audit (push) Successful in 18s
Bump plotstyle to 1.0.0 and gallery to 0.2.0
2026-07-24 10:52:41 +02:00

77 lines
1.8 KiB
Python

"""
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",
]