parent
f7a5844a1a
commit
62ebdabba2
@ -1,42 +0,0 @@
|
||||
From 8d0e919363a596c57fd228370d6929ab085be900 Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Sat, 24 May 2014 15:08:11 +0200
|
||||
Subject: [PATCH 1/2] libcss et al. are not required for standard build
|
||||
|
||||
---
|
||||
README | 6 +++---
|
||||
configure.ac | 3 +++
|
||||
libe-book.pc.in | 2 +-
|
||||
3 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index 95752dd..e1dceeb 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -20,10 +20,10 @@ Currently supported are:
|
||||
|
||||
The following libraries are required for build:
|
||||
- boost
|
||||
-- hubbub
|
||||
+- hubbub (only for --enable-experimental)
|
||||
- icu
|
||||
-- libcss
|
||||
-- libmspack
|
||||
+- libcss (only for --enable-experimental)
|
||||
+- libmspack (only for --enable-experimental)
|
||||
- librevenge
|
||||
- libxml2
|
||||
- zlib
|
||||
diff --git a/libe-book.pc.in b/libe-book.pc.in
|
||||
index 3508d96..93c248f 100644
|
||||
--- a/libe-book.pc.in
|
||||
+++ b/libe-book.pc.in
|
||||
@@ -10,4 +10,4 @@ Requires: librevenge-0.0 librevenge-stream-0.0
|
||||
Libs: -L${libdir} -le-book-@EBOOK_MAJOR_VERSION@.@EBOOK_MINOR_VERSION@
|
||||
Cflags: -I${includedir}/libe-book-@EBOOK_MAJOR_VERSION@.@EBOOK_MINOR_VERSION@
|
||||
|
||||
-Requires.private: icu-uc libcss libhubbub libmspack libxml-2.0 zlib
|
||||
+Requires.private: icu-uc libxml-2.0 zlib
|
||||
--
|
||||
1.9.0
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 5690c18cb2de1bf4f3cce3da8a2132303a0c731f Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Thu, 29 May 2014 13:30:13 +0200
|
||||
Subject: [PATCH] parse zipped FictionBook 2 files again
|
||||
|
||||
---
|
||||
src/lib/EBOOKDocument.cpp | 28 +++++++++++++++++++++++++++-
|
||||
1 file changed, 27 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/EBOOKDocument.cpp b/src/lib/EBOOKDocument.cpp
|
||||
index 5b8e7ec..c4f9913 100644
|
||||
--- a/src/lib/EBOOKDocument.cpp
|
||||
+++ b/src/lib/EBOOKDocument.cpp
|
||||
@@ -427,6 +427,25 @@ EBOOKAPI EBOOKDocument::Confidence EBOOKDocument::isSupported(librevenge::RVNGIn
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+ // TODO: This needs improvement: zipped FictionBook 2 files can contain images too...
|
||||
+ if (1 == input->subStreamCount())
|
||||
+ {
|
||||
+ const librevenge::RVNGString name(input->subStreamName(0));
|
||||
+ const unsigned long size = name.size();
|
||||
+ const char *const cName = name.cstr();
|
||||
+ if (equal(cName + (size - 4), cName + size, ".fb2"))
|
||||
+ {
|
||||
+ const scoped_ptr<RVNGInputStream> fb2(input->getSubStreamById(0));
|
||||
+ const Type xmlType = detectXML(fb2.get());
|
||||
+ if (TYPE_FICTIONBOOK2 == xmlType)
|
||||
+ {
|
||||
+ if (type)
|
||||
+ *type = xmlType;
|
||||
+ return CONFIDENCE_EXCELLENT;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
Confidence confidence = CONFIDENCE_NONE;
|
||||
@@ -533,7 +552,14 @@ EBOOKAPI EBOOKDocument::Result EBOOKDocument::parse(librevenge::RVNGInputStream
|
||||
#endif
|
||||
case TYPE_FICTIONBOOK2 :
|
||||
{
|
||||
- FB2Parser parser(input_.get());
|
||||
+ RVNGInputStreamPtr_t fb2Input(input_);
|
||||
+ // TODO: this needs to handle package with images too
|
||||
+ if (input_->isStructured())
|
||||
+ {
|
||||
+ assert(1 == input->subStreamCount());
|
||||
+ fb2Input.reset(input->getSubStreamById(0));
|
||||
+ }
|
||||
+ FB2Parser parser(fb2Input.get());
|
||||
return parser.parse(document) ? RESULT_OK : RESULT_UNKNOWN_ERROR;
|
||||
}
|
||||
#if defined ENABLE_EXPERIMENTAL
|
||||
--
|
||||
1.9.3
|
||||
|
@ -1,36 +0,0 @@
|
||||
From 3aecef6474094f520b9df954865dc7ce15ed1870 Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Sat, 24 May 2014 15:08:44 +0200
|
||||
Subject: [PATCH 2/2] HTML-based formats are not supported yet
|
||||
|
||||
---
|
||||
README | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index e1dceeb..7ff1dbb 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -2,19 +2,13 @@ libe-book is a library and a set of tools for reading and converting
|
||||
various reflowable e-book formats.
|
||||
|
||||
Currently supported are:
|
||||
-- ePub (v.2)
|
||||
- eReader .pdb
|
||||
- FictionBook v. 2 (including zipped files)
|
||||
-- HTML 1(?)-5
|
||||
-- MS HTML Help
|
||||
- PalmDoc Ebook
|
||||
- Plucker .pdb
|
||||
-- Open eBook (OEB)
|
||||
- QiOO (mobile format, for java-enabled cellphones)
|
||||
-- Rocket eBook
|
||||
- TCR (simple compressed text format)
|
||||
- TealDoc
|
||||
-- XHTML 1.0
|
||||
- zTXT
|
||||
- ZVR (simple compressed text format)
|
||||
|
||||
--
|
||||
1.9.0
|
||||
|
Loading…
Reference in new issue