subugoe/iiif-bundle

symfony 的 IIIF Bundle

0.13.1 2022-02-28 10:41 UTC

README

这是一个用于从任意数据结构中获取 IIIF 表示的 Symfony 5.x/6.x Bundle。

示例配置

subugoe_iiif:
  image:
    http:
        scheme:           "https"
        host:             "images.example.com"
    tile_width:           512
    thumbnail_size:       "96,"
    zoom_levels:          [1, 2, 4, 8, 16]
  presentation:
    logo:                 "http://service.example.com/fileadmin/gdz/layout/head_logo.jpg"
    service_id:           "http://service.exmple.com/"
    http:
        scheme:           "https"
        host:             "manifests.example.com"

格式转换器

还需要定义一个名为 subugoe_iiif.translator 的所谓转换服务,即

  Subugoe\IIIFBundle\Translator\TranslatorInterface:
    class:      Subugoe\IIIFBundle\Translator\SubugoeTranslator
    arguments:  ["@subugoe_find.search_service"]

转换器必须实现 Subugoe\IIIFBundle\Translator\TranslatorInterface。已包含一个示例转换器,请参阅 SubugoeTranslator 类。

文件系统

此 Bundle 使用 Flysystem 来检索和存储(即缓存)瓦片和缩略图。如果不应启用缓存,应使用 Null Adapter。请参阅 FlysystemBundle 文档中的配置选项和可用 Bundle。符合您需求的适配器必须在应用程序的主要 composer manifest 中要求。

请注意,需要存在两个 flysystem 服务,其中一个必须命名为 cache_filesystem 以用作缓存文件系统。原始扫描所在的原生文件系统必须别名或命名为 source_filesystem