Skip to content

Support importing filetypes other than EPUB #15

Description

@phildenhoff

We only support EPUB rn because they are very common and there was an easy-to-use crate to get data from EPUBs.

Add support for getting the same data for other core file types, specifically:

I'd like to do enforce the mimetype enum a bit better: we should look at the file extension for clues to the mimetype, validate it, and (if valid) pass around a filepath/mimetype pair (a "validated file"). Supporting incorrect file extensions is not necessary, e.g. .epub is actually a PDF? invalid & unimportable.

Appendix 1: Unplanned file types

Calibre has a wide range of import formats, not all of which are a good fit for Citadel. Citadel is specifically focused on managing ebook libraries, and (while it may support conversion in the future) not directed at editing ebook content or ebook publishing. To that end, it makes sense to focus on commonly used end formats. Specifically, we're not planning to add these formats. Please let me know if you use these!

  • CBC: CBC seems to be a collection of CBZ/CBR files. Only used by Calibre? If users use this, we may add it
  • CHM
  • DjVU: Internet Archive stopped using for new uploads as they found declining use (Internet Archive)
  • DOCX: It's an ebook management app.
  • FB2, FBZ: Russian, making it harder to support, but popular. May reconsider!
  • HTML, HTMLZ: It's an ebook management app.
  • Microsoft LIT (.lit): Unsupported protocol.
  • Broadband eBooks/BBeB (.lrx., .lrf): Unsupported, proprietary.
  • .odt: no
  • eReader (.pdb, .pml): no
  • Rocket eBook (.rb): No
  • Rich Text Format (.rtf): No
  • SNB
  • TCR
  • TXTZ

See also, this list of ebook file formats

Appendix 2: Calibre's supported list

Calibre seems to support adding whatever files you want to your library. I tried adding a PNG (image) and a GPX (GPS coordinates) file to my library, and both worked. While Calibre may be forgiving, Citadel is not. We won't support arbitrary files.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions