summaryrefslogtreecommitdiff
path: root/Home.md
blob: a0152ac7c6c57334b960dc2f2c8504cd10ed9692 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
## The Epube

Self-hosted web EPUB reader using EPUB.js, Bootstrap, and Calibre.

* responsive, offline-capable design;
* integrates with Calibre library;
* multi-device sync of last-read pages (when online);
* word definition lookups using dictd / Wiktionary;
* supports Chrome homescreen "app mode";
* optional hyphenation using [hyphen](https://github.com/ytiurin/hyphen) library;
* various themes, etc;

See also:

* [Android client (wrapper)](https://git.tt-rss.org/fox/the-epube-android)
* [Demo](https://the-epube-demo.tt-rss.org/) (login as <code>demo</code>, <code>demo</code>; database is restored every six hours)

### Screenshots

#### Library

<a href="https://tt-rss.org/images/epube/library1.png?2"><img src="https://tt-rss.org/images/epube/library1_small.png?3"></a>

#### Reader

<a href="https://tt-rss.org/images/epube/reader2.png?4"><img src="https://tt-rss.org/images/epube/reader2_small.png?5"></a>

### UI cheat sheet

* Switch pages: Left, Right, Mouse wheel, swipe left/right, space, taps/clicks on left and right sides of the window
* Show UI if it's hidden: escape or tap somewhere in the middle of reader window
* Dictionary lookup: double click/select one word 

### Installation

Use the following compose setup to either pull or build your own images:

#### .env

```ini
# Put any local modifications here.

# Calibre library base directory (mounts to /books)
BOOKS_DIR=/home/user/calibre/Books

# Default user to create (if it doesn't exist)
EPUBE_ADMIN_USER=admin
EPUBE_ADMIN_PASS=password

# bind exposed port to 127.0.0.1 by default in case reverse proxy is used.
# if you plan to run the container standalone and need origin port exposed
# use next HTTP_PORT definition (or remove "127.0.0.1:").
HTTP_PORT=127.0.0.1:8280
#HTTP_PORT=8280                                                                   
```

#### docker-compose.yml

```yaml
version: '3'

services:
  # optional dictionary server (add other dictionaries via Dockerfile)
  # comment it out if you don't need it

  dict:
    restart: unless-stopped
    build:
      dockerfile: .docker/dict/Dockerfile
      context: https://git.tt-rss.org/fox/the-epube.git

  app:
    build:
      dockerfile: .docker/app/Dockerfile
      context: https://git.tt-rss.org/fox/the-epube.git
      args:
        BUILDKIT_CONTEXT_KEEP_GIT_DIR: 1
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - app:/var/www/html
      - ${BOOKS_DIR}:/books:ro

  web-nginx:
    build:
      dockerfile: .docker/web-nginx/Dockerfile
      context: https://git.tt-rss.org/fox/the-epube.git
    restart: unless-stopped
    ports:
      - ${HTTP_PORT}:80
    volumes:
      - app:/var/www/html:ro
    depends_on:
      - app

volumes:
  app:
```

For host installation, see [README.md](https://git.tt-rss.org/fox/the-epube.git/tree/README.md)

### FAQ

#### Moving between pages is slow with some books

This happens sometime on slow devices, i.e. phones. The usual reason is Epub chapters are too large. Those can be split into smaller sections with Calibre epub converter: *EPUB Output -> Split files larger than ->* set a smaller value, 100KB should be fine.