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

allow --start-page and --end-page to be relative to end of chapter #103

Closed ryanwwest closed 2 months ago

ryanwwest commented 4 months ago

The idea

It would be nice if one could download just the last page, or the last 3 pages, of many chapters. But I'm not sure how to look up how many pages there are in each chapter, which shouldn't really be necessary anyway. In python you can do my_array[-3:] to get the last three elements, and in this case something similar could be done if you set --start-page to -3 and --end-page to -1.

Why this feature should be added to the app ?

Sometimes the last page of a chapter has funny notes from translators. There are likely many other use cases.

mansuf commented 3 months ago

Uhmmmm looks complex to me, but i will try to experiment it first, if it's works then it will be implemented. Thanks for the idea 👍

mansuf commented 2 months ago

Hello, this feature has been added in https://github.com/mansuf/mangadex-downloader/commit/63577e97b3993a23f6b1b90fa5dc117ced1d3d43. You can try it by installing development version

Installation with Git & Pip:

pip uninstall mangadex-downloader
pip install -U git+https://github.com/mansuf/mangadex-downloader.git@63577e97b3993a23f6b1b90fa5dc117ced1d3d43

Installation from Github Artifact CI:

You can download it from here


This feature can be used with chapters (--start-chapter and --end-chapter) and pages (--start-page and --end-page)

mangadex-dl "URL" --start-chapter -4 --end-chapter -1 --start-page -5 --end-page -3

If you have problem or bugs, let me know !

ryanwwest commented 1 week ago

Works great, but is this also in the latest released version?

mansuf commented 1 week ago

Works great, but is this also in the latest released version?

Sadly no, this isn't available in latest stable version (v2.10.3). It's in development version only and it will be released in v3.0.0.