Add download chapters script

This commit is contained in:
2025-05-23 22:09:52 +02:00
parent afe3eb1ce4
commit 6b3eff9fce

31
download_chapters.sh Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# Default values
FORMAT="cbz"
DELAY_MS=2000
URL="https://www.webtoons.com/en/fantasy/tower-of-god/list?title_no=95"
# Usage message
usage() {
echo "Usage: $0 [-f format] [-d delay_ms] [-u url]"
echo " -f Output format (default: cbz)"
echo " -d Delay in milliseconds between episodes (default: 2000)"
echo " -u Webtoon URL"
exit 1
}
# Parse CLI arguments
while getopts ":f:d:u:" opt; do
case ${opt} in
f) FORMAT=$OPTARG ;;
d) DELAY_MS=$OPTARG ;;
u) URL=$OPTARG ;;
\?) usage ;;
esac
done
# Execute the command
webtoon-dl \
--format "$FORMAT" \
--delay-ms="$DELAY_MS" \
"$URL"