28 |
29 | ## Table of contents
30 |
31 | - [Features](#features)
32 | - [Dependencies](#dependencies)
33 | - [Installation](#installation)
34 | - [Image rendering](#image-rendering)
35 | - [Usage](#usage)
36 | - [Manga providers](#manga-providers)
37 | - [Configuration](#configuration)
38 | - [Motivation](#motivation)
39 | - [Credits](#credits)
40 |
41 | ## Features
42 |
43 | - [Mangadex](https://mangadex.org/) and [Weebcentral](https://weebcentral.com/) are available as manga providers
44 |
45 | - Track your reading history with [anilist integration](./docs/anilist.md)
46 |
47 | - Advanced search (with filters)
48 |
49 |
50 |
51 | - Read manga in your terminal with terminals such as: Wezterm, iTerm2, Kitty, Ghostty
52 |
53 |
54 |
55 | - Reading history is stored locally (with no login required)
56 |
57 |
58 |
59 | - Download manga (available formats: cbz, epub, pdf and raw images)
60 |
61 |
62 |
63 | - Download all chapters of a manga (available formats: cbz, epub, pdf and raw images)
64 |
65 |
66 |
67 | ### Join the [discord](https://discord.gg/jNzuDCH3) server for further help, feature requests or to chat with contributors
68 |
69 | ## Dependencies
70 |
71 | On linux you may need to install the D-bus secret service library
72 |
73 | ### Debian
74 |
75 | ```shell
76 | sudo apt install libdbus-1-dev pkg-config
77 | ```
78 |
79 | ### Fedora
80 |
81 | ```shell
82 | sudo dnf install dbus-devel pkgconf-pkg-config
83 | ```
84 |
85 | ### Arch
86 |
87 | ```shell
88 | sudo pacman -S dbus pkgconf
89 | ```
90 |
91 | ## Installation
92 |
93 | ### Using cargo
94 |
95 | ```shell
96 | cargo install manga-tui --locked
97 | ```
98 |
99 | ### AUR
100 |
101 | You can install `manga-tui` from the [AUR](https://aur.archlinux.org/packages/manga-tui) with using an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers).
102 |
103 | ```shell
104 | paru -S manga-tui
105 | ```
106 |
107 | ### Nix
108 |
109 | If you have the [Nix package manager](https://nixos.org/), this repo provides a flake that builds the latest git version from source.
110 |
111 | Simply run the following:
112 |
113 | ```sh
114 | nix run 'github:josueBarretogit/manga-tui'
115 | ```
116 |
117 | Or, to install persistently:
118 |
119 | ```sh
120 | nix profile install 'github:josueBarretogit/manga-tui'
121 | ```
122 |
123 | ## Binary release
124 |
125 | Download a binary from the [releases page](https://github.com/josueBarretogit/manga-tui/releases/latest)
126 |
127 | ## Image rendering
128 |
129 | Use a terminal that can render images such as [Wezterm](https://wezfurlong.org/wezterm/index.html) (Personally I recommend using this one It's the one used in the videos), [iTerm2](https://iterm2.com/), [Kitty](https://sw.kovidgoyal.net/kitty/) and [Ghostty](https://ghostty.org/download)
130 | For more information see: [image-support](https://github.com/benjajaja/ratatui-image?tab=readme-ov-file#compatibility-matrix)
131 |
132 | > [!WARNING]
133 | > On windows image display is very buggy, see [this issue](https://github.com/josueBarretogit/manga-tui/issues/26) for more information
134 |
135 | No images will be displayed if the terminal does not have image support (but `manga-tui` will still work as a manga downloader)
136 |
137 | ## Usage
138 |
139 | After installation just run the binary
140 |
141 | ```shell
142 | manga-tui
143 | ```
144 |
145 | ## Manga providers
146 |
147 | > [!WARNING]
148 | > Expect any manga provider to fail at some point, either due to them closing operations due to a [lawsuit](https://www.japantimes.co.jp/news/2024/04/18/japan/crime-legal/manga-mura-copyright-ruling/) or the provider itself having issues on their end like [manganato](https://github.com/josueBarretogit/manga-tui/issues/132)
149 |
150 | By default when you run `manga-tui` Mangadex will be used
151 |
152 | ```shell
153 | manga-tui
154 | ```
155 |
156 | If you want to use Weebcentral or any other provider available then run:
157 |
158 | ```shell
159 | manga-tui -p weebcentral
160 | ```
161 |
162 | ## Configuration
163 |
164 | The config file is located at `XDG_CONFIG_HOME/manga-tui/config.toml`, to know where it is you can run:
165 |
166 | ```shell
167 | manga-tui --config-dir
168 |
169 | # or
170 |
171 | manga-tui -c
172 | ```
173 |
174 | Which provides the following configuration:
175 |
176 | ```toml
177 | # The format of the manga downloaded
178 | # values: cbz, raw, epub, pdf
179 | # default: "cbz"
180 | download_type = "cbz"
181 |
182 | # Download image quality, low quality means images are compressed and is recommended for slow internet connections
183 | # values: low, high
184 | # default: "low"
185 | image_quality = "low"
186 |
187 | # Pages around the currently selected page to try to prefetch
188 | # values: 0-255
189 | # default: 5
190 | amount_pages = 5
191 |
192 | # Whether or not bookmarking is done automatically, if false you decide which chapter to bookmark
193 | # values: true, false
194 | # default: true
195 | auto_bookmark = true
196 |
197 | # Whether or not downloading a manga counts as reading it on services like anilist
198 | # values: true, false
199 | # default: false
200 | track_reading_when_download = false
201 |
202 | # Enable / disable checking for new updates
203 | # values: true, false
204 | # default: true
205 | check_new_updates = true
206 |
207 | # Sets which manga provider will be used when running manga-tui,
208 | # you can override it by running manga-tui with the -p flag like this: manga-tui -p weebcentral
209 | # values: mangadex, weebcentral
210 | # default: "mangadex"
211 | default_manga_provider = "mangadex"
212 |
213 | # Enable / disable tracking reading history with services like `anilist`
214 | # values: true, false
215 | # default: true
216 | track_reading_history = true
217 |
218 | # Anilist-related config, if you want `manga-tui` to read your anilist credentials from this file then place them here
219 | [anilist]
220 | # Your client id from your anilist account
221 | # leave it as an empty string "" if you don't want to use the config file to read your anilist credentials
222 | # values: string
223 | # default: ""
224 | client_id = ""
225 |
226 | # Your acces token from your anilist account
227 | # leave it as an empty string "" if you don't want to use the config file to read your anilist credentials
228 | # values: string
229 | # default: ""
230 | access_token = ""
231 | ```
232 |
233 | Manga downloads and reading history is stored in the `manga-tui` directory, to know where it is run:
234 |
235 | ```shell
236 | manga-tui --data-dir
237 |
238 | # or
239 |
240 | manga-tui -d
241 | ```
242 |
243 | On linux it will output something like: `~/.local/share/manga-tui`
244 |
245 | On the `manga-tui` directory there will be 3 directories
246 |
247 | - `history`, which contains a sqlite database to store reading history
248 | - `mangaDownloads`, where manga will be downloaded
249 | - `errorLogs`, for storing posible errors / bugs
250 |
251 | If you want to change the location of this directory you can set the environment variable `MANGA_TUI_DATA_DIR` to some path pointing to a directory, like:
252 |
253 | ```shell
254 | export MANGA_TUI_DATA_DIR="/home/user/Desktop/mangas"
255 | ```
256 |
257 | > [!NOTE]
258 | > Mangadex-only feature
259 | By default `manga-tui` will search mangas in english, you can change the language by running:
260 |
261 | ```shell
262 | # `es` corresponds to the Iso code for spanish
263 | manga-tui lang --set 'es'
264 | ```
265 |
266 | > [!NOTE]
267 | > Mangadex-only feature
268 | Check the available languages and their Iso codes by running:
269 |
270 | ```shell
271 | manga-tui lang --print
272 | ```
273 |
274 | ## Motivation
275 |
276 | I wanted to make a "How linux user does ..." but for manga, [here is the video](https://www.youtube.com/watch?v=K0FsGRqEc1c) also this is a great excuse to start reading manga again
277 |
278 | ## Credits
279 |
280 | Many thanks to Mangadex for providing the free API please consider supporting them ❤️
281 | Many thanks to the [Ratatui organization](https://github.com/ratatui-org) for making such a good library for making TUI's in rust 🐭
282 | Many thanks to the developer of the [Ratatui-image crate](https://crates.io/crates/ratatui-image) for providing a widget that renders images in the terminal 🖼️
283 |
284 | Consider giving a star to this project ⭐
285 |
--------------------------------------------------------------------------------
/bacon.toml:
--------------------------------------------------------------------------------
1 | # This is a configuration file for the bacon tool
2 | #
3 | # Bacon repository: https://github.com/Canop/bacon
4 | # Complete help on configuration: https://dystroy.org/bacon/config/
5 | # You can also check bacon's own bacon.toml file
6 | # as an example: https://github.com/Canop/bacon/blob/main/bacon.toml
7 |
8 | default_job = "check"
9 |
10 | [jobs.check]
11 | command = ["cargo", "check", "--color", "always"]
12 | need_stdout = false
13 |
14 | [jobs.check-all]
15 | command = ["cargo", "check", "--all-targets", "--color", "always"]
16 | need_stdout = false
17 |
18 | # Run clippy on the default target
19 | [jobs.clippy]
20 | command = [
21 | "cargo", "clippy",
22 | "--color", "always",
23 | ]
24 | need_stdout = false
25 |
26 | # Run clippy on all targets
27 | # To disable some lints, you may change the job this way:
28 | # [jobs.clippy-all]
29 | # command = [
30 | # "cargo", "clippy",
31 | # "--all-targets",
32 | # "--color", "always",
33 | # "--",
34 | # "-A", "clippy::bool_to_int_with_if",
35 | # "-A", "clippy::collapsible_if",
36 | # "-A", "clippy::derive_partial_eq_without_eq",
37 | # ]
38 | # need_stdout = false
39 | [jobs.clippy-all]
40 | command = [
41 | "cargo", "clippy",
42 | "--all-targets",
43 | "--color", "always",
44 | ]
45 | need_stdout = false
46 |
47 | # This job lets you run
48 | # - all tests: bacon test
49 | # - a specific test: bacon test -- config::test_default_files
50 | # - the tests of a package: bacon test -- -- -p config
51 | [jobs.test]
52 | command = [
53 | "cargo", "nextest", "run", "--color", "always",
54 | ]
55 | need_stdout = true
56 |
57 | [jobs.doc]
58 | command = ["cargo", "doc", "--color", "always", "--no-deps"]
59 | need_stdout = false
60 |
61 | # If the doc compiles, then it opens in your browser and bacon switches
62 | # to the previous job
63 | [jobs.doc-open]
64 | command = ["cargo", "doc", "--color", "always", "--no-deps", "--open"]
65 | need_stdout = false
66 | on_success = "back" # so that we don't open the browser at each change
67 |
68 | # You can run your application and have the result displayed in bacon,
69 | # *if* it makes sense for this crate.
70 | # Don't forget the `--color always` part or the errors won't be
71 | # properly parsed.
72 | # If your program never stops (eg a server), you may set `background`
73 | # to false to have the cargo run output immediately displayed instead
74 | # of waiting for program's end.
75 | [jobs.run]
76 | command = [
77 | "cargo", "run",
78 | "--color", "always",
79 | # put launch parameters for your program behind a `--` separator
80 | ]
81 | need_stdout = true
82 | allow_warnings = true
83 | background = true
84 |
85 | # This parameterized job runs the example of your choice, as soon
86 | # as the code compiles.
87 | # Call it as
88 | # bacon ex -- my-example
89 | [jobs.ex]
90 | command = ["cargo", "run", "--color", "always", "--example"]
91 | need_stdout = true
92 | allow_warnings = true
93 |
94 | # You may define here keybindings that would be specific to
95 | # a project, for example a shortcut to launch a specific job.
96 | # Shortcuts to internal functions (scrolling, toggling, etc.)
97 | # should go in your personal global prefs.toml file instead.
98 | [keybindings]
99 | # alt-m = "job:my-job"
100 | c = "job:clippy-all" # comment this to have 'c' run clippy on only the default target
101 |
--------------------------------------------------------------------------------
/data_test/images/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josueBarretogit/manga-tui/f5ca0060f22bddf73fd5d343ee88e5fc149f5a09/data_test/images/1.jpg
--------------------------------------------------------------------------------
/data_test/images/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josueBarretogit/manga-tui/f5ca0060f22bddf73fd5d343ee88e5fc149f5a09/data_test/images/2.jpg
--------------------------------------------------------------------------------
/data_test/images/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josueBarretogit/manga-tui/f5ca0060f22bddf73fd5d343ee88e5fc149f5a09/data_test/images/3.jpg
--------------------------------------------------------------------------------
/data_test/weebcentral/chapter_page_images.txt:
--------------------------------------------------------------------------------
1 |
18 |
19 |
22 |
23 |
26 |
27 |
30 |
31 |
34 |
35 |
38 |
39 |
42 |
43 |
46 |
47 |
50 |
51 |
54 |
55 |
58 |
59 |
62 |
63 |
66 |
67 |
70 |
71 |
74 |
75 |
78 |
79 |
82 |
83 |
86 |
87 |
90 |
91 |
94 |
95 |
98 |
99 |
102 |
103 |
106 |
107 |
110 |
111 |
114 |
115 |
118 |
119 |
122 |
123 |
126 |
127 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/data_test/weebcentral/search_page_no_more_result.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
10 |
12 |
13 |
14 |
15 |
16 |