Mango/README.md

136 lines
5.3 KiB
Markdown
Raw Normal View History

2020-02-25 03:19:31 +00:00
2020-02-11 22:06:17 +00:00
2020-02-17 14:58:33 +00:00
![banner](./public/img/banner-paddings.png)
2020-02-17 14:57:02 +00:00
2020-02-25 03:19:31 +00:00
# Mango
2020-03-21 04:56:23 +00:00
[![Patreon](https://img.shields.io/badge/support-patreon-brightgreen?link=https://www.patreon.com/hkalexling)](https://www.patreon.com/hkalexling) ![Build](https://github.com/hkalexling/Mango/workflows/Build/badge.svg) [![Gitter](https://badges.gitter.im/mango-cr/mango.svg)](https://gitter.im/mango-cr/mango?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
2020-02-25 03:19:31 +00:00
2020-02-17 14:57:02 +00:00
Mango is a self-hosted manga server and reader. Its features include
2020-02-17 03:32:11 +00:00
- Multi-user support
2020-03-13 17:53:54 +00:00
- Dark/light mode switch
2020-02-17 03:32:11 +00:00
- Supports both `.zip` and `.cbz` formats
2020-03-15 17:16:19 +00:00
- Supports nested folders in library
2020-02-17 04:15:07 +00:00
- Automatically stores reading progress
2020-03-13 17:53:54 +00:00
- Built-in [MangaDex](https://mangadex.org/) downloader
2020-02-17 03:32:11 +00:00
- The web reader is responsive and works well on mobile, so there is no need for a mobile app
- All the static files are embedded in the binary, so the deployment process is easy and painless
2020-02-11 22:06:17 +00:00
## Installation
2020-02-22 02:21:34 +00:00
### Pre-built Binary
2020-04-06 14:44:45 +00:00
Simply download the pre-built binary file `mango` for the latest [release](https://github.com/hkalexling/Mango/releases). All the dependencies are statically linked, and it should work with most Linux systems on amd64.
2020-02-22 02:21:34 +00:00
2020-02-17 16:46:15 +00:00
### Docker
2020-02-17 22:28:09 +00:00
1. Make sure you have docker installed and running. You will also need `docker-compose`
2020-02-17 17:36:11 +00:00
2. Clone the repository
2020-04-06 19:43:12 +00:00
3. Copy the `env.example` file to `.env`
4. Fill out the values in the `.env` file. Note that the main and config directories will be created if they don't already exist. The files in these folders will be owned by the root user
2020-02-20 04:23:11 +00:00
5. Run `docker-compose up`. This should build the docker image and start the container with Mango running inside
2020-04-06 19:43:12 +00:00
6. Head over to `localhost:9000` (or a different port if you changed it) to log in
2020-02-17 22:28:09 +00:00
2020-04-06 14:44:45 +00:00
### Docker (via Dockerhub)
The official docker images are available on [Dockerhub](https://hub.docker.com/r/hkalexling/mango).
2020-02-17 03:32:11 +00:00
### Build from source
2020-04-06 14:44:45 +00:00
1. Make sure you have `crystal`, `shards` and `yarn` installed. You might also need to install the development headers for `libsqlite3` and `libyaml`.
2020-02-17 03:32:11 +00:00
2. Clone the repository
2020-02-17 16:46:15 +00:00
3. `make && sudo make install`
2020-02-19 02:57:06 +00:00
4. Start Mango by running the command `mango`
5. Head over to `localhost:9000` to log in
2020-02-11 22:06:17 +00:00
## Usage
2020-02-17 03:32:11 +00:00
### CLI
```
2020-05-24 06:36:40 +00:00
Mango e-manga server/reader. Version 0.4.0
2020-02-17 03:32:11 +00:00
-v, --version Show version
-h, --help Show help
-c PATH, --config=PATH Path to the config file. Default is `~/.config/mango/config.yml`
```
### Config
2020-02-20 04:23:11 +00:00
The default config file location is `~/.config/mango/config.yml`. It might be different if you are running Mango in a docker container. The config options and default values are given below
2020-02-11 22:06:17 +00:00
2020-02-17 03:32:11 +00:00
```yaml
---
port: 9000
base_url: /
library_path: ~/mango/library
db_path: ~/mango/mango.db
2020-02-17 03:32:11 +00:00
scan_interval_minutes: 5
log_level: info
upload_path: ~/mango/uploads
2020-03-13 17:53:54 +00:00
mangadex:
base_url: https://mangadex.org
api_url: https://mangadex.org/api
download_wait_seconds: 5
download_retries: 4
download_queue_db_path: ~/mango/queue.db
chapter_rename_rule: '[Vol.{volume} ][Ch.{chapter} ]{title|id}'
manga_rename_rule: '{title}'
2020-02-17 03:32:11 +00:00
```
2020-02-11 22:06:17 +00:00
2020-02-17 16:46:15 +00:00
- `scan_interval_minutes` can be any non-negative integer. Setting it to `0` disables the periodic scan
- `log_level` can be `debug`, `info`, `warn`, `error`, `fatal` or `off`. Setting it to `off` disables the logging
### Library Structure
You can organize your `.cbz/.zip` files in nested folders in the library directory. Here's an example:
```
.
├── Manga 1
│   ├── Volume 1.cbz
│   ├── Volume 2.cbz
│   ├── Volume 3.cbz
2020-03-17 15:59:32 +00:00
│   └── Volume 4.zip
└── Manga 2
   └── Vol. 1
   └── Ch.1 - Ch.3
   ├── 1.zip
   ├── 2.zip
   └── 3.zip
```
2020-02-17 04:15:07 +00:00
### Initial Login
2020-02-11 22:06:17 +00:00
2020-02-17 04:15:07 +00:00
On the first run, Mango would log the default username and a randomly generated password to STDOUT. You are advised to immediately change the password.
2020-02-11 22:06:17 +00:00
2020-02-17 04:15:07 +00:00
## Screenshots
2020-02-11 22:06:17 +00:00
2020-02-17 17:36:11 +00:00
Library:
2020-02-17 16:46:15 +00:00
![library screenshot](./.github/screenshots/library.png)
2020-02-17 17:36:11 +00:00
Title:
2020-02-17 16:46:15 +00:00
![title screenshot](./.github/screenshots/title.png)
2020-03-13 18:00:22 +00:00
Dark mode:
![dark mode screeshot](./.github/screenshots/dark.png)
2020-02-17 17:36:11 +00:00
Reader:
2020-02-17 16:46:15 +00:00
![reader screenshot](./.github/screenshots/reader.png)
2020-02-17 17:36:11 +00:00
Mobile UI:
2020-02-17 16:46:15 +00:00
![mobile screenshot](./.github/screenshots/mobile.png)
2020-03-01 02:47:59 +00:00
## Contributors
Please check the [development guideline](https://github.com/hkalexling/Mango/wiki/Development) if you are interest in code contributions.
2020-03-01 02:47:59 +00:00
[![](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/images/0)](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/links/0)[![](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/images/1)](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/links/1)[![](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/images/2)](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/links/2)[![](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/images/3)](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/links/3)[![](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/images/4)](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/links/4)[![](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/images/5)](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/links/5)[![](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/images/6)](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/links/6)[![](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/images/7)](https://sourcerer.io/fame/hkalexling/hkalexling/Mango/links/7)