├── .env.template ├── .eslintrc.cjs ├── .github ├── commit-convention.md └── workflows │ ├── publish.yml │ └── task.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.js ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── commitlint.config.js ├── package.json ├── pnpm-lock.yaml ├── readme.md ├── resource ├── 1-1.gif ├── 2-1.png ├── 2-2.png ├── 2-3.png ├── 2-4.png ├── 2-5.png └── 2-6.png ├── rollup.config.js ├── scripts ├── upload.js └── verify-commit.js ├── src ├── data │ └── headers.json ├── index.ts ├── sdk.ts ├── types.ts ├── utils.ts └── zip.ts ├── test ├── download.test.ts ├── sdk.test.ts └── utils.test.ts ├── tsconfig.json └── vitest.config.ts /.env.template: -------------------------------------------------------------------------------- 1 | # 账号名 2 | PICA_ACCOUNT= 3 | # 账号密码 4 | PICA_PASSWORD= 5 | # 代理地址,示例:http://127.0.0.1:7890 6 | PICA_PROXY= 7 | # 下载图片的并发数 8 | PICA_DL_CONCURRENCY=5 9 | # leaderboard | favorites | search 10 | # 下载内容,分别表示:排行榜 | 收藏夹 | 搜索 11 | PICA_DL_CONTENT= 12 | # 搜索关键字或漫画ID,多个用 # 隔开 13 | # 尽量输入完整漫画名,避免返回过多结果 14 | PICA_DL_SEARCH_KEYWORDS= 15 | # 指定下载章节 16 | # 使用命令行下载时,无需配置,支持手动选择下载章节 17 | # 这里的章节是指按时间排序,1代表第一章 18 | # 示例:1,3,5-20 或者设置为 all 表示全部下载 19 | PICA_DL_CHAPTER=all -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | es2020: true 6 | }, 7 | parser: '@typescript-eslint/parser', 8 | parserOptions: { 9 | sourceType: 'module', 10 | ecmaVersion: 'latest' 11 | }, 12 | plugins: ['@typescript-eslint', 'prettier'], 13 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], 14 | rules: { 15 | 'prettier/prettier': 'warn', 16 | 'no-unref': 'off', 17 | 'no-undef': 'off', 18 | '@typescript-eslint/ban-ts-comment': 'off', 19 | '@typescript-eslint/explicit-function-return-type': 'off' 20 | }, 21 | ignorePatterns: [ 22 | 'dist', 23 | 'node_modules', 24 | 'tmp', 25 | '*.d.ts', 26 | '*.{md,json,yaml,yml,html}' 27 | ], 28 | overrides: [] 29 | } 30 | -------------------------------------------------------------------------------- /.github/commit-convention.md: -------------------------------------------------------------------------------- 1 | ## Git Commit Message Convention 2 | 3 | > This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). 4 | 5 | #### TL;DR: 6 | 7 | Messages must be matched by the following regex: 8 | 9 | ``` js 10 | /^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,50}/ 11 | ``` 12 | 13 | #### Examples 14 | 15 | Appears under "Features" header, `sdk` subheader: 16 | 17 | ``` 18 | feat(sdk): add 'comments' option 19 | ``` 20 | 21 | Appears under "Bug Fixes" header, `pica-zip` subheader, with a link to issue #28: 22 | 23 | ``` 24 | fix(pica-zip): handle error 25 | 26 | close #28 27 | ``` 28 | 29 | Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: 30 | 31 | ``` 32 | perf(sdk): improve download speed by new api 33 | 34 | BREAKING CHANGE: The old api has been removed. 35 | ``` 36 | 37 | The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. 38 | 39 | ``` 40 | revert: feat(compiler): add 'comments' option 41 | 42 | This reverts commit 667ecc1654a317a13331b17617d973392f415f02. 43 | ``` 44 | 45 | ### Full Message Format 46 | 47 | A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: 48 | 49 | ``` 50 | (): 51 | 52 | 53 | 54 |