Yetangitu / owncloud-apps

Applications for Nextcloud and Owncloud personal cloud server
GNU Affero General Public License v3.0
87 stars 41 forks source link

[Feature Request] Supported formats: FB2 #26

Closed trefmanic closed 7 years ago

trefmanic commented 7 years ago

It would be nice if this app parsed fb2 files. Currently I have my whole library in fb2, because it's a very portable format. Even if metadata extraction would be only supported from an .opf file and not from .fb2 directly, that still would be fine,

Yetangitu commented 7 years ago

I'll look into this next time I find some time to give OPDS Catalog some dearly needed TLC.

Yetangitu commented 7 years ago

BTW, OPDS Catalog already supports metadata from metadata.opf files, have you tried this? It expects a directory structure like that used (and generated) by Calibre, with a single metadata.opf file in the same directory as the file to be scanned. It also supports using cover images if the .opf file contains a pointer to an existing image in the same directory.

Support for .opf metadata is implemented in lib/calibre.php

Is this sufficient for your purposes? While it is theoretically possible to add an FB2 parser to the metadata extractor (which already contains PDF and EPUB parsers) I'd like to keep OPDS Catalog as light as feasible.

Yetangitu commented 7 years ago

I implemented a basic FB2 parser to extract metadata based on the FB2 XSD. Problem is, I don't have any publications in the FB2 format so I can not test it. Can you send me a few documents which you deem to be representative (i.e. documents with a full set of metadata). OK, skip that, I just found http://fictionbook-lib.org/

BTW, It looks like the FB2 schema lacks fields for some rather essential metadata (e.g. there is no field for the copyright notice?) so the extracted metadata will necessarily lack this info as well unless it can be gleaned from one of the ISBN-based metadata crawlers.

trefmanic commented 7 years ago

Hello. I've moved on to COPS for now, but here's a link to the Google Drive folder: https://drive.google.com/open?id=0B8m0cgkuMMYVS3kxUTFwYW1FX00 There's two formats for each book, EPUB and FB2 with the identical metadata.

Yetangitu commented 7 years ago

FictionBook 2 (.fb2) metadata support (including preview) is supported from v0.8.0.