I dont know if this is a feature already implemented or not, I want to for example download the newest 3 chapters of each manga on a list.
I've tried -3, 3, 3-, etc. But it wont just download the last 3 from the array
chapter-filter relies on a working Python expression and the metadata provided by the site, like provided by --list-keywords.
Posting your cli input would probably help here. If this is indeed only a question about accessing elements from an array, something like this could maybe work: array_name[-3:]
Hello, I'm trying to figure out how to make this work, when I use --list-keywords it prints the following:
Keywords for --chapter-filter:
------------------------------
chapter
0
chapter_id
401738
chapter_minor
chapter_string
_Special - Sins on Vacation
lang
en
language
English
manga
Nanatsu no Taizai
title
_Special - Sins on Vacation
volume
0
However I can't quite figure out what to do with this information
This is how I have configured my .json file
"kissmanga":
{
"directory": ["{manga}", "{manga}_{chapter}"],
"chapter-range": "i[-1:]",
"postprocessors":
[
{
"name": "zip",
"compression": "store",
"extension": "cbz",
"keep-files": false
}
]
},
Since you mentioned the CLI input, I guess the workaround this would be to download the manga directly from the console which I am sure I can figure out how to make a batch file that cycles through the links.
However I am unable to figure out how to use those tags to create an array of chapters.
Any help would be greatly appreciated.
There is currently no way to get the last 3 chapters of a manga - in general, at least.
If you know the last chapter number you downloaded, lets say 40, you can use --chapter-filter "chapter > 40", meaning "get everything with a chapter number greater than 40", but that obviously doesn't work if you have a whole list of manga URls. The chapter variable here is the same chapter field you have in the output of --list-keywords, by the way.
The chapter-range option you are using in your config file accepts only ranges in the form <start>-<end> (for example 2-4, meaning item 2 to 4 in the list of all chapters). There are no negative indices allowed and you can't specify anything like "the last 3 items", only "the first 3" with 1-3 or -3.
Possible solutions to implement:
--chapter-range 1-3 into "get the last 3 items".chapter_max field as metadata representing the highest available chapter number. You could then do --chapter-filter "chapter >= chapter_max - 3" to get the latest 3 chapters."chapter-range": "[-3:]" would actually be valid.I guess I'll go with the first one for right now. Should be the easiest one to implement.
The last one might be a bit too much, but maybe I'll implement something like that for v2.0.0.
Done. Set chapter-reverse to true and chapter-range to 1-3 to only download the 3 newest chapters from any manga:
"kissmanga":
{
"chapter-reverse": true,
"chapter-range": "1-3",
}
Thank you so much! godbless! It works just as I wanted!
Most helpful comment
Done. Set
chapter-reversetotrueandchapter-rangeto1-3to only download the 3 newest chapters from any manga: