~q3cpma/mangadex-tools

bcf905dc0d503d1ec8af192d1d743f042ad69c2c — q3cpma 2 months ago 71b5a52
mdex_dl: accept raw manga IDs
1 files changed, 6 insertions(+), 2 deletions(-)

M mdex_dl.tcl
M mdex_dl.tcl => mdex_dl.tcl +6 -2
@@ 15,7 15,10 @@ set optres [util::autocli \
	} \
	[file tail [info script]] \
	{download MangaDex chapters} \
	{{MANGA_URL [CHAPTER_NUM...]} {CHAPTER_URL...} {MANGA_URL covers [VOLUME_NUM...]}} \
	{
		{MANGA_URL|MANGA_ID [CHAPTER_NUM...]} {CHAPTER_URL...}
		{MANGA_URL|MANGA_ID covers [VOLUME_NUM...]}
	} \
	{
		{Download each of the specified items (chapters or covers).}
		{If no item number list is specified, download all of them.}


@@ 31,7 34,8 @@ if {$proxy ne ""} {
	set ::env(https_proxy) $proxy
}

if {[regexp "^$URL_BASE_RE/title/($UUID_RE)(?:/\[^/\]+)?\$" [lindex $argv 0] -> mid]} {
if {[regexp "^$URL_BASE_RE/title/($UUID_RE)(?:/\[^/\]+)?\$" [lindex $argv 0] -> mid] ||
	[regexp "^$UUID_RE\$" [lindex $argv 0] -> mid]} {
	if {$argc > 1 && [lindex $argv 1] eq "covers"} {
		dl_covers $mid $lang [lrange $argv 2 end]
		exit