Skip to content

Design notes

hardbacknutter edited this page Jan 14, 2026 · 2 revisions

This is a living document and may contain outdated information and broken source code links. If you come across such, please feel free to log a new issue.

A very brief summary what is needed to add search-sites.

Searching for books needs a "SearchEngine" which is one or more interfaces from SearchEngine

Resolving Authors is really the same logic, but kept in a separate class/interface so cross-use between sites can be done. AuthorResolver

There is a list of steps documented to add a "SearchEngine" in the class docs: EngineId

A very simple example of a "SearchEngine" is BookFinder. The site is not enabled in app releases because it's too limited, but I use it for testing. BookFinderSearchEngine

An example of an Author resolver: DatabazeKnihAuthorResolver.java

If the site has an API, extend SearchEngineBase.java

If the site will need scraping the HTML, extend JsoupSearchEngineBase

But... the real work start using the "selectors" from the JSoup library, in particular the selector-syntax

May look daunting, but a lot of the code is similar between the engines so can be copied and adapted. The jsoup selector parsing and extracting (often with regex's) is the tedious work. Firefox/Chrome "Inspect page" is your first stop obviously to understand the page you want to parse.

Clone this wiki locally