Comments (9)
Please anyone at least tell me, Is "text search" possible or not??
from epub.js.
For the immediate future search isn't possible, though we are planning to develop a backend to enable it.
It will likely be separate from the ePub.js code, as it will require a python.
from epub.js.
I wonder if you could build the search indexes using lunr.js. It already supports tokenization, stemming, and stop words. I haven't used it for anything serious, so I don't know about performance, and building the indexes on the client is not optimal, so just a thought.
from epub.js.
@AJRenold - could you update this thread with the search progress and close?
from epub.js.
We're developing a light-weight indexing and search tool which allows an entire epub file to be searched via a search API. (https://github.com/futurepress/epubjs-search) The reader plugin search.js (https://github.com/futurepress/epub.js/blob/master/reader/plugins/search.js#L4) points to the API endpoint where you must be running a search server with the index of the same book. This model only supports indexing and searching a single book.
I'll update the epubjs-search readme today with better instructions on how to use the library.
from epub.js.
Please update the epubjs-search readme. Thanks!
@AJRenold @fchasen
By the way, would a nice alternative option be to just use the unzipped/decompressed epub folder format and perform a search query that iterates over all of the epub's '.xhtml' files?
from epub.js.
I just updated the epubjs-search README.md with instructions that should get you up and running a simple Python search API.
We are actively considering other options to create a search feature that runs on the client side only.
from epub.js.
The search engine needs to have a sense of how a epub is put together or it can't generate the Epub CFI and cfi's are what allow the reader to jump to a location in the book.
To briefly describe what the search engine does:
- Parses the epub spine / manifest
- Indexs each page that was in the spine along with the spine items cfi position
- Retrieves pages from the index that match a search query
- Looks for all the instances in that page of the query and assigns them full cfi's
- Returns the list of results as json
from epub.js.
Is lunr.js good for this issue?
from epub.js.
Related Issues (20)
- What happened to the official website? The content is very strange. HOT 2
- Continuous Manager inside an element that is scrolling that is not the viewport?
- Scripted Content SandBoxing issue, And CFI pages position
- Extracting the text per rendered section / block using epub js? HOT 32
- How do I add a paginated swipe animation?
- highlight not working post integrating with hammer.js for swiping HOT 1
- how to call images in css file? HOT 1
- about rendition.next(), rendition.prev()
- about InlineView
- Minified XML causes 'container.xml not found' HOT 4
- renderTo CSS selector instead of ID HOT 1
- [Bug] Blank page when resize happen during loading
- How to add any emoji on page ?
- How to add any emoji on page? HOT 2
- how to turn the page by wheel
- rapidly scroll up and down will cause error in continuous-scrolled example
- How do I get the text on this page when it is truncated
- fix error File not found in the epub and replace file addresses
- Generate total page locations HOT 2
- Highlight
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epub.js.