epubドキュメントの追加メタデータを取得する

epubドキュメントの追加メタデータを取得する

詳細を提供せずに私が知っている唯一のコマンドは、file、stat、mediainfoです。どちらも .epub ドキュメントに関するいくつかのアイデアを提供しますが、コンテンツ全体を渡すわけではありません。たとえば、fileはファイル名のみを提供し、epub文書であることを宣言します。 Mediainfoは少し良く、次の情報を提供します。

Format                                   : ZIP
File size                                : 93.9 MiB
FileExtension_Invalid                    : zip docx odt xlsx ods

そのため、ファイル名に加えて、その中に何が含まれているのかがわかります。しかし、最も重要な部分が欠けています。 epubの本はいつ出版されたのか、epubのバージョンはどのバージョンを使用し、どのアプリを使用したのか。 .epub ドキュメントなどの作成に使用されます。 2、2.0.1、3、3.2などのバージョンが多すぎます。上記のすべての情報を使用してください。問題を解決するのは簡単です。

pdfinfoに似ています。

ベストアンサー1

exiftoolファイルメタデータの抽出に好むツールを試してください。

$ exiftool Downloads/accessible_epub_3.epub
ExifTool Version Number         : 12.57
File Name                       : accessible_epub_3.epub
Directory                       : Downloads
File Size                       : 4.1 MB
File Modification Date/Time     : 2023:05:05 08:13:22+01:00
File Access Date/Time           : 2023:05:05 08:13:33+01:00
File Inode Change Date/Time     : 2023:05:05 08:13:22+01:00
File Permissions                : -rw-r--r--
File Type                       : EPUB
File Type Extension             : epub
MIME Type                       : application/epub+zip
Identifier Id                   : pub-identifier
Identifier                      : urn:isbn:9781449328030
Title Id                        : pub-title
Title                           : Accessible EPUB 3
Language Id                     : pub-language
Language                        : en
Date                            : 2012:02:20
Meta Property                   : dcterms:modified
Meta                            : 2012:10:24 15:30:00Z
Creator Id                      : pub-creator12
Creator                         : Matt Garrish
Contributor                     : O’Reilly Production Services, David Futato, Robert Romano, Brian Sawyer, Dan Fauxsmith, Karen Montgomery
Publisher                       : O’Reilly Media, Inc.
Rights                          : Copyright © 2012 O’Reilly Media, Inc
Manifest Item Id                : htmltoc
Manifest Item Properties        : nav
Manifest Item Media-type        : application/xhtml+xml
Manifest Item Href              : bk01-toc.xhtml
Spine Itemref Idref             : cover
Spine Itemref Linear            : no

(次はサンプルのepubファイルです。http://idpf.github.io/epub3-samples/30/samples.html)

おすすめ記事