Commit 02c1d62e authored by nanahira's avatar nanahira

readme and catchups

parent ad122d73
......@@ -49,7 +49,11 @@ pic.sources 查询全部的图源。 pic -s pixiv 查询含有 pixiv 标签的
* [`koishi-plugin-picsource-localfs`](https://github.com/koishijs/koishi-plugin-picsource-localfs) 本地文件图源。
* [`koishi-plugin-picsource-lolicon`](https://github.com/koishijs/koishi-plugin-picsource-lolicon) [Lolicon](https://api.lolicon.app/ )图源。
* [`koishi-plugin-picsource-lolicon`](https://github.com/koishijs/koishi-plugin-picsource-lolicon) [Lolicon](https://api.lolicon.app/ ) 图源。
* [`koishi-plugin-picsource-heisi`](https://github.com/koishijs/koishi-plugin-picsource-localfs) 黑丝图源。
* [`koishi-plugin-picsource-lolicon`](https://github.com/koishijs/koishi-plugin-picsource-lolicon) [Yande](https://yande.re/) 以及 [Konachan](https://konachan.com) 图源。
### 类定义
......@@ -104,8 +108,10 @@ class MyPicSource extends PicSource {
}
export const using = ['pics'];
export function apply(ctx: Context, config: PluginConfig) {
ctx.on('service/pics', () => ctx.pics.addSource(new MyPicSource(ctx, config), ctx));
ctx.pics.addSource(new MyPicSource(ctx, config));
}
```
......@@ -136,9 +142,9 @@ export interface PicSourceInfo {
#### `PicSourceConfig`
[`koishi-utils-schemagen`](https://github.com/koishijs/koishi-utils-schemagen) 用户可以使用 `PicSourceConfig` 类。插件的配置文件直接继承该类即可。
[`schemastery-gen`](https://code.mycard.moe/3rdeye/schemastery-gen)['koishi-thirdeye'](https://code.mycard.moe/3rdeye/koishi-thirdeye) 用户可以使用 `PicSourceConfig` 类。插件的配置文件直接继承该类即可。
> `koishi-utils-schemagen` 包请**不要**使用 Webpack 打包。使用 Webpack 编写插件的用户请把该包列为 external 。
> `schemastery-gen` 包请**不要**使用 Webpack 打包。使用 Webpack 编写插件的用户请把该包列为 external 。
```ts
export class PicSourceConfig {
......
......@@ -9,7 +9,7 @@
"version": "8.2.2",
"license": "MIT",
"dependencies": {
"koishi-thirdeye": "^8.2.0",
"koishi-thirdeye": "^8.2.1",
"lodash": "^4.17.21",
"source-map-support": "^0.5.20"
},
......@@ -2669,21 +2669,21 @@
}
},
"node_modules/koishi-thirdeye": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-8.2.0.tgz",
"integrity": "sha512-8qC0flqMSIV+17t5/uT2ihmZdBqggt5qdepL6HjjIJStt2phZrzKfPmpzNItCyg8W2zmEPyop5AcYSJWQIV4fg==",
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-8.2.1.tgz",
"integrity": "sha512-EVOqunYyach5sd5R7MQdcVzav2+dskiWDWo815jS+4bOQEjTMSuvU/cxZhzS5XnPAK9ZBUyeChJ8+h+7O8FtRg==",
"dependencies": {
"@types/koa": "^2.13.4",
"@types/koa__router": "^8.0.11",
"koishi-decorators": "^1.0.6",
"lodash": "^4.17.21",
"reflect-metadata": "^0.1.13",
"schemastery": "^2.1.2",
"schemastery-gen": "^2.4.0",
"schemastery": "^2.4.2",
"schemastery-gen": "^2.4.1",
"typed-reflector": "^1.0.9"
},
"peerDependencies": {
"koishi": "^4.1.1"
"koishi": "^4.2.0"
}
},
"node_modules/levn": {
......@@ -3575,14 +3575,14 @@
}
},
"node_modules/schemastery": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-2.4.1.tgz",
"integrity": "sha512-BBXNUBLlYv3WR0C/EmwMiAUkwv9wWUCwYt13F3wgkoaecAY5JtWTQkHSzZk3UmL+KumfYkCnBIlHxfwFXd4Cyg=="
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-2.4.2.tgz",
"integrity": "sha512-0sCJuGa7LyAtnoXEVwUKSPSTMfizA0zpK0kX7dzGPLpeLuxgJg7VVyR2KFsfHg+WlqYbUOvoGY7JSNPk5I5uHQ=="
},
"node_modules/schemastery-gen": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-2.4.0.tgz",
"integrity": "sha512-ez+jP+AHXoBXTX+/D0AkQiaw7lWlhSPts5rEGcDwpPuS8C+/Vu/QYm+A0+wMufpJJ+fBv1HoQHXHUcjqkZh0Hw==",
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-2.4.1.tgz",
"integrity": "sha512-JJqNrStiTlPwVt72RkcC5GuWqVApr8vbeYFSuy+DMU6SXzZWL39HiSjGddu4q2UtuJOrkffJIpbfeXYNKGtiqg==",
"dependencies": {
"lodash": "^4.17.21",
"reflect-metadata": "^0.1.13",
......@@ -6424,17 +6424,17 @@
}
},
"koishi-thirdeye": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-8.2.0.tgz",
"integrity": "sha512-8qC0flqMSIV+17t5/uT2ihmZdBqggt5qdepL6HjjIJStt2phZrzKfPmpzNItCyg8W2zmEPyop5AcYSJWQIV4fg==",
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/koishi-thirdeye/-/koishi-thirdeye-8.2.1.tgz",
"integrity": "sha512-EVOqunYyach5sd5R7MQdcVzav2+dskiWDWo815jS+4bOQEjTMSuvU/cxZhzS5XnPAK9ZBUyeChJ8+h+7O8FtRg==",
"requires": {
"@types/koa": "^2.13.4",
"@types/koa__router": "^8.0.11",
"koishi-decorators": "^1.0.6",
"lodash": "^4.17.21",
"reflect-metadata": "^0.1.13",
"schemastery": "^2.1.2",
"schemastery-gen": "^2.4.0",
"schemastery": "^2.4.2",
"schemastery-gen": "^2.4.1",
"typed-reflector": "^1.0.9"
}
},
......@@ -7080,14 +7080,14 @@
}
},
"schemastery": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-2.4.1.tgz",
"integrity": "sha512-BBXNUBLlYv3WR0C/EmwMiAUkwv9wWUCwYt13F3wgkoaecAY5JtWTQkHSzZk3UmL+KumfYkCnBIlHxfwFXd4Cyg=="
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-2.4.2.tgz",
"integrity": "sha512-0sCJuGa7LyAtnoXEVwUKSPSTMfizA0zpK0kX7dzGPLpeLuxgJg7VVyR2KFsfHg+WlqYbUOvoGY7JSNPk5I5uHQ=="
},
"schemastery-gen": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-2.4.0.tgz",
"integrity": "sha512-ez+jP+AHXoBXTX+/D0AkQiaw7lWlhSPts5rEGcDwpPuS8C+/Vu/QYm+A0+wMufpJJ+fBv1HoQHXHUcjqkZh0Hw==",
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-2.4.1.tgz",
"integrity": "sha512-JJqNrStiTlPwVt72RkcC5GuWqVApr8vbeYFSuy+DMU6SXzZWL39HiSjGddu4q2UtuJOrkffJIpbfeXYNKGtiqg==",
"requires": {
"lodash": "^4.17.21",
"reflect-metadata": "^0.1.13",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment