An open API service indexing awesome lists of open source software.

https://github.com/egnd/fb2lib

This is a server for indexing and searching fb2-books at zip archives.
https://github.com/egnd/fb2lib

bleve fb2 fb2-library fb2converter full-text-search golang

Last synced: 3 months ago
JSON representation

This is a server for indexing and searching fb2-books at zip archives.

Awesome Lists containing this project

README

          

# fb2lib

[![Go Reference](https://pkg.go.dev/badge/github.com/egnd/fb2lib.svg)](https://pkg.go.dev/github.com/egnd/fb2lib)
[![Go Report Card](https://goreportcard.com/badge/github.com/egnd/fb2lib)](https://goreportcard.com/report/github.com/egnd/fb2lib)
[![Coverage](https://gocover.io/_badge/github.com/egnd/fb2lib)](https://gocover.io/github.com/egnd/fb2lib)
[![Pipeline](https://github.com/egnd/fb2lib/actions/workflows/latest.yml/badge.svg)](https://github.com/egnd/fb2lib/actions?query=workflow%3ALatest)

This is a server for indexing and searching fb2-books at zip archives.

### Quick start:
1. Put your archives with books into ```books``` folder

2. Build books index:
```bash
docker run --rm -t --entrypoint=build_index \
-v $(pwd)/cfg.yml:/configs/app.override.yml:ro \
-v $(pwd)/books:/var/libs/default:ro \
-v $(pwd)/index:/var/index:rw \
-v $(pwd)/db:/var/db:rw \
-v $(pwd)/logs:/var/logs:rw \
egnd/fb2lib
```

3. Build books summary:
```bash
docker run --rm -t --entrypoint=build_summary \
-v $(pwd)/cfg.yml:/configs/app.override.yml:ro \
-v $(pwd)/db:/var/db:rw \
-v $(pwd)/logs:/var/logs:rw \
egnd/fb2lib
```

3. Create ```docker-compose.yml```:
```yaml
version: "3.8"
services:
app:
image: egnd/fb2lib
ports:
- 80:8080
volumes:
- ./cfg.yml:/configs/app.override.yml:ro
- ./libs/default:/var/libs/default:ro
- ./index:/var/index:rw
- ./db:/var/db:rw
```

4. Run server with:
```bash
docker-compose up
```

5. Server is available at http://localhost

### Hints:
* Advanced query language - https://blevesearch.com/docs/Query-String-Query/