Аудит метаданных обложки EPUB с помощью небольшого скрипта на Python
DEV · 22.11.2026 · 04:24
Скрипт на Python позволяет проверить метаданные обложки EPUB, чтобы устранить проблемы с отображением на устройствах, таких как Kindle. Он анализирует файл container.xml и сравнивает…
Оригинал
Audit EPUB Cover Metadata With a Small Python Script
When an EPUB shows its cover in Apple Books or Calibre but arrives on a Kindle as a grey tile, the image is usually fine. What is broken is the metadata that tells a converter which image is the cover. You can check it yourself with a short, standard-library Python script that reads container.xml, finds the OPF, and compares the EPUB 3 cover-image property, the EPUB 2 reference, the file path and the real image type. Key takeaways An EPUB is a ZIP. META-INF/container.xml p