mansuf / mangadex-downloader

A command-line tool to download manga from MangaDex, written in Python.
https://mangadex-dl.mansuf.link/
MIT License
472 stars 37 forks source link

add flag --filename and make support imported as library #67

Closed zYxDevs closed 8 months ago

zYxDevs commented 1 year ago

The idea

Why this feature should be added to the app ?

mansuf commented 1 year ago

add --filename flag so people can choose path to download and filename.

If you want to use custom path then use --path option. Or did you mean you want an option to change manga folder name ?

add support mangadex-dl to imported as python library

Starting v2.0.0, mangadex-downloader doesn't have public API anymore. There reasons for that, see below

Of course, you can dive to the code itself and start using some of functions and classes that are not intended for public use. I'm not forcing you to not use the private API. But i must warned you that the code itself can be changed without any notice. So if you upgrade the package, the current script that you use may be broke.

zYxDevs commented 1 year ago

yes even when used -d flags downloaded file will be on a folder with the manga title. i want to change manga folder name.

mansuf commented 8 months ago

I added this feature in v3.0.0 branch (commit https://github.com/mansuf/mangadex-downloader/commit/3698cf10aa22c14e1225000bffbff4f2a3b55c2e)

You can start trying it now by installing development version (v3.0.0 branch)

Installation with git + pip:

pip uninstall mangadex-downloader
pip install git+https://github.com/mansuf/mangadex-downloader.git@3698cf10aa22c14e1225000bffbff4f2a3b55c2e

If you're installing mangadex-downloader from github releases, you can download the development version in here:

The download files are available in "artifacts" section

https://github.com/mansuf/mangadex-downloader/actions/runs/7249594589/


Example usage:

# This will download to directory "/home/sussyuser/manga/Some manga title/"
# with filename "Vol. insert_volume_here Ch. insert_chapter_here.cbz"
mangadex-dl "URL" --path "/home/sussyuser/manga/{manga.title}" -f cbz --filename-chapter "Vol.{chapter.volume} Ch.{chapter.chapter}{file_ext}"

For more information about path placeholders, you can read the documentation here -> https://mangadex-dl.mansuf.link/en/v3.0.0/cli_ref/path_placeholders.html

If you have a problem, issue or bug, you can re-open and comment in this issue tracker here.