β¨ Mangal is a fancy CLI app written in Go which scrapes, downloads and packs manga into different formats
βοΈ The most important feature of Mangal is that it supports user defined scrapers that can be added with just a few lines of config file (see config & limitations)
π¦ Works in both modes - TUI & Inline. Use it as a standalone app or integrate with scripts
πΏ This app is inspired by awesome ani-cli. Check it out!
Currently Mangal supports these formats
- CBZ
- Zip
- Plain (just images)
mangal.mp4
For more information about inline mode type
mangal inline --help
# Search manga. Returns a list of found manga
mangal inline --query "death note"
# Search manga. Returns a JSON list of found manga
mangal inline --query "death note" --json
# Get chapters of first manga in the list
mangal inline --query "death note" --manga 1
# Download first chapter of the first manga in the list
mangal inline --query "death note" --manga 1 --chapter 1
TLDR: Use
mangal config where
to show where config should be located andmangal config init
to create default config
Config is located at the OS default config directory.
- Unix -
$XDG_CONFIG_HOME/mangal/config.toml
if$XDG_CONFIG_HOME
exists, else$HOME/.config/mangal/config.toml
- Darwin (macOS) -
$HOME/Library/Application\ Support/mangal/config.toml
- Windows -
%AppData%\mangal\config.toml
You can load config from custom path by using --config
flag
mangal --config /user/configs/config.toml
By default, Mangal uses manganelo as a source
# Which sources to use. You can use several sources, it won't affect perfomance'
use = ['manganelo']
# Available options: pdf, cbz, zip, plain (just images)
format = "pdf"
# If false, then OS default reader will be used
use_custom_reader = false
custom_reader = "zathura"
# Custom download path, can be either relative (to the pwd) or absolute
download_path = '.'
# Fullscreen mode
fullscreen = true
# Input prompt icon
prompt = "π"
# Input placeholder
placeholder = "What shall we look for?"
# Selected chapter mark
mark = "βΌ"
# Search window title
title = "Mangal"
# Add images to cache
# If set to true mangal could crash when trying to redownload something really quickly
# Usually happens on slow machines
cache_images = false
[sources]
[sources.manganelo]
# Base url
base = 'https://ww5.manganelo.tv'
# Search endpoint. Put %s where the query should be
search = 'https://ww5.manganelo.tv/search/%s'
# Selector of entry anchor (<a></a>) on search page
manga_anchor = '.search-story-item a.item-title'
# Selector of entry title on search page
manga_title = '.search-story-item a.item-title'
# Manga chapters anchors selector
chapter_anchor = 'li.a-h a.chapter-name'
# Manga chapters titles selector
chapter_title = 'li.a-h a.chapter-name'
# Reader page images selector
reader_page = '.container-chapter-reader img'
# Random delay between requests
random_delay_ms = 500 # ms
# Are chapters listed in reversed order on that source?
# reversed order -> from newest chapter to oldest
reversed_chapters_order = true
Usage:
mangal [flags]
mangal [command]
Available Commands:
cleanup Remove cached and temp files
completion Generate the autocompletion script for the specified shell
config Config manipulation
help Help about any command
inline Search & Download manga in inline mode
version Show version
Flags:
-c, --config string use config from path
-f, --format string use custom format - pdf, cbz, zip, plain
-h, --help help for mangal
Use "mangal [command] --help" for more information about a command.```
brew tap metafates/tap
brew install metafates/tap/mangal
go install github.com/metafates/mangal@latest
git clone https://github.com/metafates/mangal.git
cd mangal
go build
You can also cross build for windows, linux & macos by running
cross-compile.py
Even though many manga sites will work, there exists some (serious) limitations to which sites could be added
- Navigation layout should follow this model
- Each manga have a separate page
- Manga page should have a some form of chapters list (not lazy loaded)
- Each chapter should have a separate reader page with all images
Some sites that work well
I'm planning to make a more advanced scraper creation system to overcome this roadblocks somewhere in the future
Manga icon taken from here