Data Format - satoshi-create/emakimono-next GitHub Wiki

🧞 Data Format

This project uses a two-layered data structure to represent emaki scrolls:

  1. image-metadata-cache/image-metadata-cache.json — scroll metadata and image structure
  2. emaki-text-data/{titeen}.json — chapter-based textual annotations (multilingual)

📂 1. Scroll Metadata: image-metadata-cache.json

This file contains all the key metadata for each emaki scroll, including author, era, thumbnails, and a sequence of image panels with size and layout data.

Example Entry

{
  "id": 1,
  "title": "鳥獸人物戦画絵巻",
  "titleen": "Chōjū-jinbutsu-giga_first",
  "author": "鳥筒僧正",
  "authoren": "toba-sojo-kakuyu",
  "edition": "甲巻",
  "backgroundImage": "/110310200304.webp",
  "thumb": "/cyoujyuu_yamazaki_kou_thumb.webp",
  "video": "https://youtu.be/Si8NzY2drSg",
  "era": "平安",
  "eraen": "Heian",
  "desc": "...",
  "descen": "...",
  "keyword": [
    { "name": "戦画", "slug": "caricature" },
    { "name": "仏教", "slug": "buddhism" }
  ],
  "emakis": [
    {
      "cat": "image",
      "config": "cloudinary",
      "src": "v1735717675/xxx.jpg",
      "name": "panel_01",
      "srcWidth": 1804,
      "srcHeight": 1080
    },
    {
      "cat": "ekotoba",
      "chapter": "1"
    }
  ]
}

🔍 Key Fields

Field Description
title / titleen Scroll title (JP / EN)
author / authoren Creator name
desc / descen Description (localized)
backgroundImage, thumb Background and thumbnails
video Optional video link
keyword[] Thematic tags (JP + slug for filtering)
emakis[] Sequence of visual and textual sections

🖼️ emakis[] Array

This field contains all elements shown in the viewer, including:

  • "cat": "image" — a scroll segment (image panel)
  • "cat": "ekotoba" — a chapter marker or text anchor
  • "chapter" — used to link image segments with their corresponding text

Images can be loaded via Cloudinary, with proper width/height metadata for layout control.


📖 2. Textual Annotations: emaki-text-data/{scrollId}.json

This file maps chapter numbers to titles and localized titles.

Example

[
  {
    "chapter": "1",
    "title": "兎と猿の水遊び",
    "titleen": "Rabbits and Monkeys Playing in the Water"
  },
  {
    "chapter": "2",
    "title": "兎と蛙の賀弓",
    "titleen": "Archery Gambling Between Rabbits and Frogs"
  }
]

These are used to render section titles dynamically as the user scrolls.
Make sure chapter numbers match those in emakis[].chapter.


🌍 i18n Support

  • Each field supports Japanese and English versions: title / titleen, desc / descen, etc.
  • Text data files can also be localized per scroll: Chōjū-jinbutsu-giga_first.json, Chōjū-jinbutsu-giga_first.en.json, etc.

✅ Best Practices

  • Keep chapter numbers synchronized between image and text layers
  • Use Cloudinary or other CDNs to optimize scroll images
  • Tag each scroll with descriptive keyword slugs for filtering or search
  • Use ekotoba entries to define chapter breaks without visible elements

🔭 For real-world usage, see [MVP Emaki Scrolls](./MVP-Emaki-Scrolls).