⚠️ ᴛʜɪs ʀᴇᴘᴏsɪᴛᴏʀʏ ɪs ᴅᴇᴘʀᴇᴄᴀᴛᴇᴅ⚠️ We moved all the
r2-*-kotlin
modules to a single repository:kotlin-toolkit
.
readium / r2-streamer-kotlin Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
⚠️ ᴛʜɪs ʀᴇᴘᴏsɪᴛᴏʀʏ ɪs ᴅᴇᴘʀᴇᴄᴀᴛᴇᴅ⚠️ We moved all the
r2-*-kotlin
modules to a single repository:kotlin-toolkit
.
When i try to fetch the json manifest with te following URL http://localhost:43201/e3ab7e31-2895-4c80-b69e-beb96776fec6/manifest
, it always fail and print this error:
07-19 09:14:12.153 22200-22471/org.readium.r2reader I/System.out: ManifestHandler JsonGenerationException | JsonMappingException com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.json.JSONObject and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.readium.r2.shared.Publication["coverLink"]->org.readium.r2.shared.Link["properties"]->org.readium.r2.shared.Properties["json"])
I'm testing this on the develop
branch. It gaves me the same output wether I'm using the streamer alone or in the r2-testapp-kotlin app.
I have a hard time to understand how the webpub manifest is served by the server.
I thought the route was: http://localhost:someport/some-uuid-to-the-book/manifest.json
All I see is http://localhost:someport/some-uuid-to-the-book/manifest
(with the route defined here). And that fails (see #19).
I checked the Go implementation of the streamer, the Swift implementation and there is a route to manifest.json
. Why not on the Kotlin streamer?
Should be related to a link, which is not well parsed
When I open a book with the streamer, I got the manifest.json:
{
"metadata": {
"languages": [
"fr"
],
"publicationDate": "2013-10-24",
"identifier": "9782864YYYXXX",
"modified": "Fri Apr 17 15:42:42 GMT+02:00 2015",
"title": "Some book",
"rendition": {
"layout": "Reflowable"
},
"rights": " ",
"authors": [
{
"name": "Some author",
"roles": [
"aut"
]
}
],
"publishers": [
{
"name": "Some publisher"
}
]
},
"links": [
{
"type": "application/webpub+json",
"href": "http://localhost:48792/somebook.epub/manifest.json",
"rel": [
"self"
],
"properties": "org.readium.r2.shared.Properties@88c372a"
}
],
"spine": [
{
"type": "application/xhtml+xml",
"href": "/EPUB/Content/cover.xhtml",
"properties": "org.readium.r2.shared.Properties@fe791b"
},
{
"type": "application/xhtml+xml",
"href": "/EPUB/Content/pb.xhtml",
"properties": "org.readium.r2.shared.Properties@b21fab8"
},
{
"type": "application/xhtml+xml",
"href": "/EPUB/Content/9782864973072-0.xhtml",
"properties": "org.readium.r2.shared.Properties@a2c0091"
},
{
"type": "application/xhtml+xml",
"href": "/EPUB/Content/9782864973072-1.xhtml",
"properties": "org.readium.r2.shared.Properties@e0e9bf6"
}
],
"resources": [
{
"title": "nav",
"type": "application/xhtml+xml",
"href": "/EPUB/Navigation/nav.xhtml",
"rel": [
"contents"
],
"properties": "org.readium.r2.shared.Properties@ab8f093"
},
{
"title": "css",
"type": "text/css",
"href": "/EPUB/Style/style.css",
"properties": "org.readium.r2.shared.Properties@ebd68d0"
},
{
"title": "cover-image",
"type": "image/jpeg",
"href": "/EPUB/Image/cover.jpg",
"rel": [
"cover"
],
"properties": "org.readium.r2.shared.Properties@d7530c9"
},
{
"title": "image-0",
"type": "image/jpeg",
"href": "/EPUB/Image/9782864973072-0.jpg",
"properties": "org.readium.r2.shared.Properties@43933ce"
}
]
}
I have two questions about it:
href
is absolute? in the example from Hadrien Gardeur, all the resources and spines have relative URLs (and it causes some issues in third-parties navigators).properties
attribute?r2-testapp-kotlin can not compile because of Server constructor
See details here:
readium/webpub-manifest#24
Failed to resolve: org.nanohttpd:nanohttpd:2.3.2. In my project. what is the issue? Is this class not included in this version?
There is no SMIL file support for this library while extracting the epub. Please suggest any date by which your going to give the support for that as modern epub viewer requires that feature.
Cannot use streamer.server.Server, keep getting Cannot access 'org.nanohttpd.router.RouterNanoHTTPD' which is a supertype of 'org.readium.r2.streamer.server.Server'. Check your module classpath for missing or conflicting dependencies
.
r2-shared-kotlin
: 2.0.0r2-streamer-kotlin
: 2.0.0r2-navigator-kotlin
: 2.0.0r2-opds-kotlin
:r2-lcp-kotlin
: 2.0.0To be done in ContentFilter.kt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.