piclist 1.9.10 → 1.9.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,22 @@
1
- name: publish
2
- on:
3
- push:
4
- branches:
5
- - alpha
6
- jobs:
7
- build:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - name: Clone repo
11
- uses: actions/checkout@v1
12
- - name: Setup node
13
- uses: actions/setup-node@v1
14
- with:
15
- node-version: '16.x'
16
- registry-url: 'https://registry.npmjs.org'
17
- - name: Install modules
18
- run: yarn
19
- - run: npm run build
20
- - run: npm publish --tag alpha --access public
21
- env:
1
+ name: publish
2
+ on:
3
+ push:
4
+ branches:
5
+ - alpha
6
+ jobs:
7
+ build:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: Clone repo
11
+ uses: actions/checkout@v1
12
+ - name: Setup node
13
+ uses: actions/setup-node@v1
14
+ with:
15
+ node-version: '16.x'
16
+ registry-url: 'https://registry.npmjs.org'
17
+ - name: Install modules
18
+ run: yarn
19
+ - run: npm run build
20
+ - run: npm publish --tag alpha --access public
21
+ env:
22
22
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,42 +1,42 @@
1
- name: Build and Push Docker Image
2
-
3
- on:
4
- push:
5
- tags:
6
- - '*'
7
- workflow_dispatch:
8
-
9
- jobs:
10
- build-and-push:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout Repository
14
- uses: actions/checkout@v2
15
-
16
- - name: Set up Docker Buildx
17
- uses: docker/setup-buildx-action@v1
18
-
19
- - name: Login to Docker Hub
20
- uses: docker/login-action@v1
21
- with:
22
- username: ${{ secrets.DOCKERHUB_USERNAME }}
23
- password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
24
-
25
- - name: Build and Push Docker Image
26
- uses: docker/build-push-action@v2
27
- with:
28
- context: .
29
- file: ./Dockerfile
30
- push: true
31
- tags: kuingsmile/piclist:latest
32
- platforms: linux/amd64,linux/arm64
33
-
34
- - name: Build and Push Docker Image with Tag
35
- if: startsWith(github.ref, 'refs/tags/')
36
- uses: docker/build-push-action@v2
37
- with:
38
- context: .
39
- file: ./Dockerfile
40
- push: true
41
- tags: kuingsmile/piclist:${{ github.ref_name }}
42
- platforms: linux/amd64,linux/arm64
1
+ name: Build and Push Docker Image
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build-and-push:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout Repository
14
+ uses: actions/checkout@v2
15
+
16
+ - name: Set up Docker Buildx
17
+ uses: docker/setup-buildx-action@v1
18
+
19
+ - name: Login to Docker Hub
20
+ uses: docker/login-action@v1
21
+ with:
22
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
23
+ password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
24
+
25
+ - name: Build and Push Docker Image
26
+ uses: docker/build-push-action@v2
27
+ with:
28
+ context: .
29
+ file: ./Dockerfile
30
+ push: true
31
+ tags: kuingsmile/piclist:latest
32
+ platforms: linux/amd64,linux/arm64
33
+
34
+ - name: Build and Push Docker Image with Tag
35
+ if: startsWith(github.ref, 'refs/tags/')
36
+ uses: docker/build-push-action@v2
37
+ with:
38
+ context: .
39
+ file: ./Dockerfile
40
+ push: true
41
+ tags: kuingsmile/piclist:${{ github.ref_name }}
42
+ platforms: linux/amd64,linux/arm64
@@ -1,22 +1,22 @@
1
- name: publish
2
- on:
3
- push:
4
- branches:
5
- - master
6
- jobs:
7
- build:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - name: Clone repo
11
- uses: actions/checkout@v1
12
- - name: Setup node
13
- uses: actions/setup-node@v1
14
- with:
15
- node-version: '16.x'
16
- registry-url: 'https://registry.npmjs.org'
17
- - name: Install modules
18
- run: yarn
19
- - run: npm run build
20
- - run: npm publish --access public
21
- env:
1
+ name: publish
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ jobs:
7
+ build:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: Clone repo
11
+ uses: actions/checkout@v1
12
+ - name: Setup node
13
+ uses: actions/setup-node@v1
14
+ with:
15
+ node-version: '16.x'
16
+ registry-url: 'https://registry.npmjs.org'
17
+ - name: Install modules
18
+ run: yarn
19
+ - run: npm run build
20
+ - run: npm publish --access public
21
+ env:
22
22
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,19 +1,19 @@
1
- name: manually-trigger
2
- on: workflow_dispatch
3
- jobs:
4
- build:
5
- runs-on: ubuntu-latest
6
- steps:
7
- - name: Clone repo
8
- uses: actions/checkout@v1
9
- - name: Setup node
10
- uses: actions/setup-node@v1
11
- with:
12
- node-version: '16.x'
13
- registry-url: 'https://registry.npmjs.org'
14
- - name: Install modules
15
- run: yarn
16
- - run: npm run build
17
- - run: npm publish --access public
18
- env:
1
+ name: manually-trigger
2
+ on: workflow_dispatch
3
+ jobs:
4
+ build:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: Clone repo
8
+ uses: actions/checkout@v1
9
+ - name: Setup node
10
+ uses: actions/setup-node@v1
11
+ with:
12
+ node-version: '16.x'
13
+ registry-url: 'https://registry.npmjs.org'
14
+ - name: Install modules
15
+ run: yarn
16
+ - run: npm run build
17
+ - run: npm publish --access public
18
+ env:
19
19
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,48 @@
1
+ ## :tada: 1.9.12 (2025-06-03)
2
+
3
+
4
+ ### :sparkles: Features
5
+
6
+ * **custom:** add error handling for missing SM.MS token in uploader plugin ([b229807](https://github.com/Kuingsmile/PicList-Core/commit/b229807))
7
+ * **custom:** improve image upload handling and error notifications in uploader plugin ([50e8dc8](https://github.com/Kuingsmile/PicList-Core/commit/50e8dc8))
8
+
9
+
10
+ ### :bug: Bug Fixes
11
+
12
+ * **custom:** fix typo ([a3dc79b](https://github.com/Kuingsmile/PicList-Core/commit/a3dc79b))
13
+
14
+
15
+ ### :package: Chore
16
+
17
+ * **custom:** remove unused files ([0a6827f](https://github.com/Kuingsmile/PicList-Core/commit/0a6827f))
18
+
19
+
20
+ ### :pencil: Documentation
21
+
22
+ * **custom:** add DeepWiki reference to English and Chinese README files ([50c4b09](https://github.com/Kuingsmile/PicList-Core/commit/50c4b09))
23
+ * **custom:** update readme ([abc7986](https://github.com/Kuingsmile/PicList-Core/commit/abc7986))
24
+
25
+
26
+
27
+ ## :tada: 1.9.11 (2025-02-27)
28
+
29
+
30
+ ### :sparkles: Features
31
+
32
+ * **custom:** optimize getconfig to hot-reload ([da65a05](https://github.com/Kuingsmile/PicList-Core/commit/da65a05))
33
+
34
+
35
+ ### :bug: Bug Fixes
36
+
37
+ * **custom:** fix alist output url bug ([3270f67](https://github.com/Kuingsmile/PicList-Core/commit/3270f67))
38
+
39
+
40
+ ### :pencil: Documentation
41
+
42
+ * **custom:** add chinease readme.md ([08386c3](https://github.com/Kuingsmile/PicList-Core/commit/08386c3))
43
+
44
+
45
+
1
46
  ## :tada: 1.9.10 (2024-12-27)
2
47
 
3
48
 
package/License CHANGED
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 Molunerfinn
4
- Copyright (c) 2023-present Kuingsmile
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Molunerfinn
4
+ Copyright (c) 2023-present Kuingsmile
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -1,35 +1,47 @@
1
1
  # PicList-Core
2
2
 
3
+ English | [简体中文](./README_cn.md)
4
+
3
5
  ![standard](https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square)
4
6
  ![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)
5
7
  ![node](https://img.shields.io/badge/node-%3E%3D16.0.0-blue?style=flat-square)
6
8
 
7
9
  ![picgo-core](https://cdn.jsdelivr.net/gh/Molunerfinn/test/picgo/picgo-core-fix.jpg)
8
10
 
9
- A tool for picture uploading. Both CLI & api supports. It also supports plugin system, please check [Awesome-PicGo](https://github.com/PicGo/Awesome-PicGo) to find powerful plugins.
11
+ A powerful tool for image uploading with both CLI & API support. PicList-Core extends PicGo-Core with additional features while maintaining plugin compatibility. Check out [Awesome-PicGo](https://github.com/PicGo/Awesome-PicGo) for a collection of powerful plugins.
12
+
13
+ You can refer to the [DeepWiki of PiclList-Core](https://deepwiki.com/Kuingsmile/PicList-Core/) for more information.
14
+
15
+ **Natively supports Typora integration**.
10
16
 
11
- Based on Picgo-Core and add more features.
17
+ ## Enhanced Features
12
18
 
13
- **Typora support natively**.
19
+ - **Image processing capabilities**:
20
+ - Add watermarks, compress images, and convert formats
21
+ - Configure via `picgo set buildin watermark` and `picgo set buildin compress` CLI commands
22
+ - Processing happens during beforeTransform phase, ensuring compatibility with all plugins
14
23
 
15
- ## New Features
24
+ - **Advanced renaming**:
25
+ - Set custom rename rules via `picgo set buildin rename`
16
26
 
17
- - Add watermark, compress and convert image format features
18
- - Set watermark and compress parameters through `picgo set buildin watermark` and `picgo set buildin compress` under CLI command
19
- - Image processing is beforeTransform, which does not conflict with any plugin
20
- - Add support for advanced rename, you can set the rename rule through `picgo set buildin rename` under the CLI command
21
- - Add new built-in picbed: WebDAV, SFTP, Local path
22
- - Adds support for imgur account uploads
23
- - Built-in server just like PicList-Desktop server, you can use `picgo-server` to start the server
24
- - Fix several bugs of PicGo-Core
27
+ - **Additional built-in image hosting services**:
28
+ - WebDAV, SFTP, Local path, AWS S3
29
+ - Improved Imgur support with account-based uploads
30
+
31
+ - **Built-in server**:
32
+ - Similar to PicList-Desktop server
33
+ - Launch with `picgo-server` command
34
+
35
+ - **Bug fixes**:
36
+ - Addresses several issues from the original PicGo-Core
25
37
 
26
38
  ## Installation
27
39
 
28
- PicList should be installed with node.js >= 16
40
+ PicList requires Node.js >= 16
29
41
 
30
- ### before install
42
+ ### Prerequisites
31
43
 
32
- As PicList depends on [sharp](https://sharp.pixelplumbing.com/), you need to install sharp before install PicList.
44
+ PicList depends on [sharp](https://sharp.pixelplumbing.com/). Install it first:
33
45
 
34
46
  ```bash
35
47
  npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
@@ -113,6 +125,15 @@ docker exec -it piclist sh
113
125
  picgo install picgo-plugin-xxx
114
126
  ```
115
127
 
128
+ #### Change config in docker
129
+
130
+ You can use `docker exec` to change config in docker.
131
+
132
+ ```bash
133
+ docker exec -it piclist sh
134
+ picgo set xxx
135
+ ```
136
+
116
137
  ### Server
117
138
 
118
139
  You can use `picgo-server` to start a server, default port is `36677`.
package/README_cn.md ADDED
@@ -0,0 +1,249 @@
1
+ # PicList-Core
2
+
3
+ [English](./README.md) | 简体中文
4
+
5
+ ![standard](https://img.shields.io/badge/code%20style-standard-green.svg?style=flat-square)
6
+ ![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)
7
+ ![node](https://img.shields.io/badge/node-%3E%3D16.0.0-blue?style=flat-square)
8
+
9
+ ![picgo-core](https://cdn.jsdelivr.net/gh/Molunerfinn/test/picgo/picgo-core-fix.jpg)
10
+
11
+ PicList-Core 是一个功能强大的图片上传工具,提供 CLI 和 API 两种调用方式。它在 PicGo-Core 的基础上增强了功能,同时保持插件兼容性。查看 [Awesome-PicGo](https://github.com/PicGo/Awesome-PicGo) 获取丰富的插件资源。
12
+
13
+ 你可以查看 [PiclList-Core 的 DeepWiki](https://deepwiki.com/Kuingsmile/PicList-Core/) 获取更多信息。
14
+
15
+ **原生支持 Typora 集成**。
16
+
17
+ ## 增强功能
18
+
19
+ - **图像处理能力**:
20
+ - 添加水印、压缩图片和转换格式
21
+ - 通过 `picgo set buildin watermark` 和 `picgo set buildin compress` CLI 命令进行配置
22
+ - 处理过程发生在 beforeTransform 阶段,确保与所有插件兼容
23
+
24
+ - **高级重命名**:
25
+ - 通过 `picgo set buildin rename` 设置自定义重命名规则
26
+
27
+ - **额外内置图床**:
28
+ - WebDAV、SFTP、本地路径、AWS S3
29
+ - 改进的 Imgur 支持,支持账户上传
30
+
31
+ - **内置服务器**:
32
+ - 类似于 PicList-Desktop 服务器
33
+ - 使用 `picgo-server` 命令启动
34
+
35
+ - **错误修复**:
36
+ - 解决了原始 PicGo-Core 的多个问题
37
+
38
+ ## 安装
39
+
40
+ PicList 需要 Node.js >= 16
41
+
42
+ ### 前置条件
43
+
44
+ PicList 依赖 [sharp](https://sharp.pixelplumbing.com/),请先安装它:
45
+
46
+ ```bash
47
+ npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
48
+ npm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips"
49
+ npm install sharp
50
+ ```
51
+
52
+ ### 全局安装
53
+
54
+ ```bash
55
+ npm install piclist -g
56
+
57
+ # 或者
58
+
59
+ yarn global add piclist
60
+ ```
61
+
62
+ ### 本地安装
63
+
64
+ ```bash
65
+ npm install piclist -D
66
+
67
+ # 或者
68
+
69
+ yarn add piclist -D
70
+ ```
71
+
72
+ ## 使用方法
73
+
74
+ ### Docker
75
+
76
+ 你可以使用Docker运行PicList-Core。
77
+
78
+ #### docker run
79
+
80
+ 将`./piclist`更改为你自己的路径,该路径是放置`config.json`文件的位置,并将`piclist123456`更改为你自己的密钥。
81
+
82
+ ```bash
83
+ docker run -d \
84
+ --name piclist \
85
+ --restart always \
86
+ -p 36677:36677 \
87
+ -v "./piclist:/root/.piclist" \
88
+ kuingsmile/piclist:latest \
89
+ node /usr/local/bin/picgo-server -k piclist123456
90
+ ```
91
+
92
+ #### docker-compose
93
+
94
+ 从本仓库下载`docker-compose.yml`,或将以下内容复制到`docker-compose.yml`:
95
+
96
+ ```yaml
97
+ version: '3.3'
98
+
99
+ services:
100
+ node:
101
+ image: 'kuingsmile/piclist:latest'
102
+ container_name: piclist
103
+ restart: always
104
+ ports:
105
+ - 36677:36677
106
+ volumes:
107
+ - './piclist:/root/.piclist'
108
+ command: node /usr/local/bin/picgo-server -k piclist123456
109
+ ```
110
+
111
+ 你可以将`./piclist`更改为你自己的路径,该路径是放置`config.json`文件的位置,并在`command`中更改密钥。
112
+
113
+ 然后运行:
114
+
115
+ ```bash
116
+ docker-compose up -d
117
+ ```
118
+
119
+ #### 在Docker中安装插件
120
+
121
+ 你可以使用`docker exec`在Docker中安装插件。
122
+
123
+ ```bash
124
+ docker exec -it piclist sh
125
+ picgo install picgo-plugin-xxx
126
+ ```
127
+
128
+ #### 在Docker中更新配置
129
+
130
+ 你可以使用`docker exec`在Docker中更新配置。
131
+
132
+ ```bash
133
+ docker exec -it piclist sh
134
+ picgo set xxx
135
+ ```
136
+
137
+ ### 服务器
138
+
139
+ 你可以使用`picgo-server`启动服务器,默认端口为`36677`。
140
+
141
+ 启动服务器:
142
+
143
+ ```bash
144
+ picgo-server
145
+ node ./bin/picgo-server
146
+ ```
147
+
148
+ > 强烈建议添加`--key`参数以避免未经授权的访问。例如:`picgo-server --key 123456`
149
+
150
+ 显示帮助:
151
+
152
+ ```bash
153
+ $ picgo-server -h
154
+
155
+ Usage: picgo-server [options]
156
+
157
+ Options:
158
+
159
+ -h, --help 显示帮助信息
160
+ -c, --config 设置配置路径
161
+ -p, --port 设置端口,默认端口为36677
162
+ --host 设置主机,默认主机为0.0.0.0
163
+ -k, --key 设置密钥以避免未经授权的访问
164
+ -v, --version 显示版本号
165
+
166
+ Examples:
167
+ picgo-server -c /path/to/config.json
168
+ picgo-server -k 123456
169
+ picgo-server -c /path/to/config.json -k 123456
170
+ ```
171
+
172
+ #### 接口
173
+
174
+ - `/upload?picbed=xxx&key=xxx` 上传图片,`picbed`用于设置图床,`key`用于设置密钥
175
+ - `/heartbeat` 心跳检测
176
+
177
+ ### CLI使用
178
+
179
+ > PicList-Core使用`SM.MS`作为默认上传图床。
180
+
181
+ 显示帮助:
182
+
183
+ ```bash
184
+ $ picgo -h
185
+
186
+ Usage: picgo [options] [command]
187
+
188
+ Options:
189
+
190
+ -v, --version 输出版本号
191
+ -d, --debug 调试模式
192
+ -s, --silent 静默模式
193
+ -c, --config <path> 设置配置路径
194
+ -h, --help 输出使用信息
195
+
196
+ Commands:
197
+
198
+ install|add <plugins...> 安装picgo插件
199
+ uninstall|rm <plugins...> 卸载picgo插件
200
+ update <plugins...> 更新picgo插件
201
+ set|config <module> [name] 配置picgo模块
202
+ upload|u [input...] 上传,开始上传
203
+ use [module] 使用picgo模块
204
+ init [options] <template> [project] 创建picgo插件的开发模板
205
+ ```
206
+
207
+ #### 从路径上传图片
208
+
209
+ ```bash
210
+ picgo upload /xxx/xx/xx.jpg
211
+ ```
212
+
213
+ #### 从剪贴板上传图片
214
+
215
+ > 从剪贴板获取的图片将被转换为`png`格式
216
+
217
+ ```bash
218
+ picgo upload
219
+ ```
220
+
221
+ ### 在Node项目中使用
222
+
223
+ #### CommonJS
224
+
225
+ ```js
226
+ const { PicGo } = require('piclist')
227
+ ```
228
+
229
+ #### ES模块
230
+
231
+ ```js
232
+ import { PicGo } from 'piclist'
233
+ ```
234
+
235
+ #### API使用示例
236
+
237
+ ```js
238
+ const picgo = new PicGo()
239
+
240
+ // 从路径上传图片
241
+ picgo.upload(['/xxx/xxx.jpg'])
242
+
243
+ // 从剪贴板上传图片
244
+ picgo.upload()
245
+ ```
246
+
247
+ ## 文档
248
+
249
+ 获取更多详细信息,请查看[PicGo-Core文档](https://picgo.github.io/PicGo-Core-Doc/)。