Skip to content

Instantly share code, notes, and snippets.

@ZappaBoy
Created July 29, 2022 22:52
Show Gist options
  • Save ZappaBoy/28d3b1aa0989494d6c353dc3712e96a6 to your computer and use it in GitHub Desktop.
Save ZappaBoy/28d3b1aa0989494d6c353dc3712e96a6 to your computer and use it in GitHub Desktop.
Manga pdf download
# This is a really simple script that work with mangodl
# Please check and support it: https://github.com/Gyro7/mangodl
# Afted downloaded mangodl set a default directory if you prefer:
# mangodl --directory "$HOME/Documents/manga"
# Usages:
#
# Download only first chapter
# mangodlpdf "Chainsaw Man"
#
# Download only a specific chapter
# mangodlpdf "Chainsaw Man" 5
#
# Download chapters in a range (included)
# mangodlpdf "Chainsaw Man" 1 5
function mangodlpdf(){
local name="$1"
local start="${2:-1}"
local end="${3:-}"
if [ -n "$end" ]; then
args="-cr $start $end"
else
args="-c $start"
fi
mangodl -D "$name" -s -o pdf $args
}
mangodlpdf
# You can simply use that script as an alias removing the last line and replacing with:
# alias mangodlpdf="mangodlpdf"
# And adding both funciton and alias to ~/.bash_aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment