Skip to content
forked from metafates/mangal

πŸ“– The most advanced cli manga downloader in the entire universe! Lua scrapers, export formats, anilist integration, fancy TUI and more!

License

Notifications You must be signed in to change notification settings

2096779623/mangal

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mangal 3 πŸ“œ

Linux macOS Windows Termux

The most advanced CLI manga downloader in the entire universe!

mangal.mp4

Try it!

curl -sL mangal.metafates.one/run | sh

Note This script does not install anything, it just downloads, verifies and runs Mangal. Not available on Windows.

Table of contents

Features

  • Lua Scrapers!!! You can add any source you want by creating your own (or using someone's else) scraper with Lua 5.1. See mangal-scrapers repository
  • Mangadex Manganelo Built-In
  • Download & Read Manga - I mean, it would be strange if you couldn't, right?
  • 4 Different export formats - PDF, CBZ, ZIP and plain images
  • 3 Different modes - TUI, Mini and Inline
  • Fast? - YES.
  • Monolith - ZERO runtime dependencies. Even Lua is built in.
  • Fancy - (οΎ‰>Ο‰<)οΎ‰ :qο½₯::ο½₯οΎŸβ€™β˜…,qο½₯:ο½₯οΎŸβ€™β˜†
  • Cross-Platform - Linux, macOS, Windows, Termux (partially)
  • Anilist integration - Track your manga progress on Anilist when reading with Mangal.

Installation

Linux MacOS Termux

Install using this shell script

curl -sL mangal.metafates.one/install | sh

This script will automatically detect OS & Distro and use the best option available. For example, on macOS it will try to use Homebrew, on Ubuntu it will install the .deb package and so on...

Termux support is limited to downloading manga only. You can't read chapters or use headless chrome based scrapers

😑 I hate scripts! Show me how to install it manually

Arch Linux

AUR package (maintained by @balajsra, thank you)

Ubuntu / Debian

  1. Download the *.deb file from the release page
  2. Run sudo dpkg --install ... where ... is the name of the file you downloaded

Fedora / Any other rpm based distro

  1. Download the *.rpm file from the release page
  2. Run sudo rpm --install ... where ... is the name of the file you downloaded

MacOS

Install using Homebrew

brew tap metafates/mangal
brew install mangal

Termux

  1. Download the arm64 linux binary from the release page
  2. Move it to the $PREFIX/bin
  3. Install resolve-conf & proot (pkg install -y resolve-conf proot)
  4. Run mangal with proot -b $PREFIX/etc/resolv.conf:/etc/resolv.conf mangal (install script will create an alias for this automatically)

Pre-compiled

Download the pre-compiled binaries from the releases page and copy them to the desired location.

From source

Visit this link to install Go

git clone --depth 1 https://github.com/metafates/mangal.git
cd mangal
go install -ldflags="-s -w"

Windows

Install using Scoop (thanks to @SonaliBendre for adding it to the official bucket)

scoop bucket add extras
scoop install mangal
In case it's outdated

Use my bucket

scoop bucket add metafates https://github.com/metafates/scoop-metafates
scoop install mangal

Docker

Install using... well, you know. (thanks to @ArabCoders for reference)

docker pull metafates/mangal

To run

docker run --rm -ti -e "TERM=xterm-256color" -v $(PWD)/mangal/downloads:/downloads -v $(PWD)/mangal/config:/config metafates/mangal

Usage

TUI

Just run mangal and you're ready to go.

Keybinds
Bind Description
? Show help
↑/j ↓/k β†’/l ←/h Navigate
g Go to first
G Go to last
/ Filter
esc Back
space Select one
tab Select all
v Select volume
backspace Unselect all
enter Confirm
o Open URL
r Read
q Quit
ctrl c Force quit

Mini

Mini mode tries to mimic ani-cli

To run: mangal mini

Screenshot 2022-08-14 at 09 37 14

Inline

Inline mode is intended for use with other scripts.

Example of usage:

mangal inline --source Manganelo --query "death note" --manga first --chapters all  -d

This will download all chapters of the "Death Note" from Manganelo.

Type mangal help inline for more information

Other

See mangal help for more information

Configuration

Mangal uses TOML format for configuration under the mangal.toml filename. Config path depends on the OS. To find yours, use mangal where --config. For example, on Linux it would be ~/.config/mangal/mangal.toml.

Use env variable MANGAL_CONFIG_PATH to set custom config path.

See mangal env to show all available env variables.

Command Description
mangal config get Get config value for specific key
mangal config set Set config value for specific key
mangal config info List all config fields with description for each
mangal config init Write current config to a file

Custom scrapers

TLDR; To browse and install a custom scraper from mangal-scrapers repository run

mangal install

Mangal has a Lua5.1 VM built-in some useful libraries, such as headless chrome, http client, html parser and so on...

Check the defined modules for more information.

For scraper examples, check the mangal-scrapers repository

Creating a custom scraper

This command will create example.lua file in the mangal where --sources directory.

mangal gen --name example --url https://example.com

Open the file and edit it as you wish. Take a look at the comments for more information. See mangal-scrapers repository for examples.

You can test it by running mangal run <filepath>

It should automatically appear in the list of available scrapers.

New to Lua? Quick start guide

Anilist

Mangal also supports integration with anilist.

It will mark chapters as read on Anilsit when you read them inside mangal.

For more information see wiki

Maybe I'll add more sites in the future, like myanimelist. Open for suggestions!

Honorable mentions

Similar Projects

  • mangadesk - Terminal client for MangaDex
  • ani-cli - A cli tool to browse and play anime
  • manga-py - Universal manga downloader
  • animdl - A highly efficient, fast, powerful and light-weight anime downloader and streamer
  • tachiyomi - Free and open source manga reader for Android

Libraries

  • bubbletea, bubbles & lipgloss - Made mangal shine! The best TUI libraries ever ✨
  • gopher-lua - Made it possible to write custom scrapers with Lua ❀️
  • cobra and viper - Responsible for the awesome CLI & config experience πŸ› 
  • pdfcpu - Fast pdf processor in pure go πŸ“„
  • And many others!

Contributors

And of course, thanks to all the contributors! You are awesome!


If you find this project useful or want to say thank you, please consider starring it, that would mean a lot to me ⭐

About

πŸ“– The most advanced cli manga downloader in the entire universe! Lua scrapers, export formats, anilist integration, fancy TUI and more!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 82.7%
  • Shell 16.0%
  • Other 1.3%