]> granicus.if.org Git - file/commitdiff
EPub
authorChristos Zoulas <christos@zoulas.com>
Fri, 7 Jan 2011 20:23:14 +0000 (20:23 +0000)
committerChristos Zoulas <christos@zoulas.com>
Fri, 7 Jan 2011 20:23:14 +0000 (20:23 +0000)
magic/Magdir/archive

index f9b0520ad490801c9feb610941c19e6f48f06df5..0776fb7161204d1c30f35c1a5998e61b00822983 100644 (file)
@@ -1,5 +1,5 @@
 #------------------------------------------------------------------------------
-# $File: archive,v 1.60 2010/10/26 14:08:47 christos Exp $
+# $File: archive,v 1.61 2011/01/07 20:23:14 christos Exp $
 # archive:  file(1) magic for archive formats (see also "msdos" for self-
 #           extracting compressed archives)
 #
 # From: Adam Buchbinder <adam.buchbinder@gmail.com>
 12     string  BB02            Bacula volume
 >20    bedate  x               \b, started %s
+
+# ePub is XHTML + XML inside a ZIP archive.  The first member of the
+#   archive must be an uncompressed file called 'mimetype' with contents
+#   'application/epub+zip'
+
+# start by checking that this is a ZIP archive, then check for the
+#   proper mimetype file
+# From: Ralf Brown <ralf.brown@gmail.com>
+0      string  PK\003\004
+>0x1E  string  mimetypeapplication/epub+zip    EPUB document
+!:mime application/epub+zip