2.1.0
Release Note: 2.1.0
2023-04-02
Site Support
- Added Ganma
Ganma is a non-pirate site where contents are behind the paywall, you need a subscription purchased via Google Play Store and App Store and link it to your Ganma account, then log in to the website, open the Network inspector (F12 for mainstream browsers) and get your cookie from the request header.
Ganma provides official Japanese manga series.
Feature
- [Library] Added getter and setter for
baseUrl
- New
-A, --auth
that accepts a string that contains token or cookie, having a lower priority thancookie
. - [CLI] New
-p, --presets
flags, loading a JSON file that contains a set of parameters for sites.- Each site can have its own presets, use
"module"
to declare site, if"module"
is not set, it's used for all sites. - Rules written below overrides those above.
- Rule names are the same as CLI flags, full names using camelCase, e.g.
maxTitleLength
,zipLevel
- You can still use flags, and flags come with higher priorities.
- Each site can have its own presets, use
[
{
"archive": "cbz",
"batch": 5,
"retry": true,
"info": true,
"output": "~/Downloads/manga",
"zipLevel": 5
},
{
"module": "zerobyw",
"batch": 10,
"cookie": "./cookie.txt",
"maxTitleLength": 30
},
{
"module": "copymanga",
"format": "webp"
},
{
"module": "ganma",
"auth": "your_cookie_string"
}
]
npx comic-dl -p presets.json -u serie_url
- [CLI] New
generate, g, gen
command for generating a new module.
# Using in the project root
# Using -m, --module flag for module name, starting with lowercase, camelCase
npx . gen --module ganma
- [CLI] You can also generate a presets.json using the
generate
command
npx comic-dl gen --presets > presets.json
Fix
- Fixed multiple bugs when downloading as images
- Incorrect chapter names
- Wrongly determination of existing chapters
Docs
- Added docs of
- [User] Site introductions
- [User] Using presets
- [Dev] Creating a new module
Dev
- Added
options
toChapter
type, which is the returning value ofgetSerieInfo
and gets passed togetImageList
getImageList
now accepts a 2nd parameteroptions
which is passed from the returning value ofgetSerieInfo
- Added
static preferredCLIPresets
function toComicDownloader
that returns the CLIOptions to be written whengen --presets
class MySiteDownloader extends ComicDownloader {
// ...
getSerieInfo(url: string) {
// ...
return {
// ...
chapters: [
{
index: 0,
name: 'chapter_name',
uri: 'uri',
options: {
key: 'value', // put anything here
},
},
],
};
}
getImageList(
url: string,
options?: Record<string, any>, // this options is that options above
) {
// ...
}
}
Misc
- [CLI] CLI source codes are moved to
src/cli
, wherecli.ts
is renamed toindex.ts
- Added eslint and prettier