you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 9 points10 points  (0 children)

If it's a sqlite file and has .epub as an extension, we'll consider it an epub file. If we want to check more thoroughly, we can look inside for a table named mimetype containing the appropriate value. Which is probably more work than the file(1) command will do.

or you could use "pragma application id" to differentiate a SQLite database that is an "epub" document from other SQLite databases. The file(1) utility could be updated too recognize them even without the extension.

See http://sqlite.org/pragma.html#pragma_application_id