wespy-ts 0.2.0 → 1.0.0
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.
- package/README.md +26 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# wespy-ts
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/wespy-ts)
|
|
4
|
+
[](https://github.com/Cuimc/WeSpy-TS/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
文章抓取与 Markdown 转换工具 — 支持微信公众号、掘金等平台。
|
|
4
7
|
|
|
5
8
|
## 支持平台
|
|
6
9
|
|
|
@@ -12,38 +15,22 @@
|
|
|
12
15
|
|
|
13
16
|
## 安装
|
|
14
17
|
|
|
15
|
-
### 全局安装
|
|
16
|
-
|
|
17
18
|
```bash
|
|
19
|
+
# 全局安装(推荐,可直接使用 wespy 命令)
|
|
18
20
|
npm install -g wespy-ts
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### 项目依赖
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
# 或作为项目依赖安装
|
|
24
23
|
npm install wespy-ts
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
### 本地开发
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
git clone git@github.com:Cuimc/WeSpy-TS.git
|
|
31
|
-
cd WeSpy-TS
|
|
32
|
-
npm install
|
|
33
|
-
npm run build
|
|
34
|
-
```
|
|
35
|
-
|
|
36
26
|
## CLI 使用
|
|
37
27
|
|
|
38
|
-
|
|
28
|
+
全局安装后直接使用 `wespy` 命令:
|
|
39
29
|
|
|
40
30
|
```bash
|
|
41
31
|
# 获取单篇文章(默认输出 Markdown)
|
|
42
32
|
wespy fetch-article https://mp.weixin.qq.com/s/xxxxx
|
|
43
33
|
|
|
44
|
-
# 使用 npx 运行
|
|
45
|
-
npx wespy fetch-article https://mp.weixin.qq.com/s/xxxxx
|
|
46
|
-
|
|
47
34
|
# 指定输出格式和目录
|
|
48
35
|
wespy fetch-article https://mp.weixin.qq.com/s/xxxxx -o ./output --all
|
|
49
36
|
|
|
@@ -54,6 +41,12 @@ wespy fetch-album https://mp.weixin.qq.com/mp/appmsgalbum?... --max 5
|
|
|
54
41
|
wespy https://mp.weixin.qq.com/s/xxxxx -o ./output --html --json
|
|
55
42
|
```
|
|
56
43
|
|
|
44
|
+
也可以通过 `npx` 直接运行,无需安装:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx wespy-ts fetch-article https://mp.weixin.qq.com/s/xxxxx
|
|
48
|
+
```
|
|
49
|
+
|
|
57
50
|
### CLI 参数
|
|
58
51
|
|
|
59
52
|
| 参数 | 说明 | 默认值 |
|
|
@@ -128,19 +121,23 @@ interface ArticleDraft {
|
|
|
128
121
|
{ ok: false, error: { code: string, message: string, retryable: boolean } }
|
|
129
122
|
```
|
|
130
123
|
|
|
131
|
-
## 测试
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
npm test
|
|
135
|
-
```
|
|
136
|
-
|
|
137
124
|
## 开发
|
|
138
125
|
|
|
139
126
|
```bash
|
|
140
|
-
|
|
141
|
-
|
|
127
|
+
git clone git@github.com:Cuimc/WeSpy-TS.git
|
|
128
|
+
cd WeSpy-TS
|
|
129
|
+
npm install
|
|
130
|
+
|
|
131
|
+
npm run build # 编译 TypeScript
|
|
132
|
+
npm run dev # watch 模式
|
|
133
|
+
npm test # 运行测试
|
|
134
|
+
npm run lint # 类型检查
|
|
142
135
|
```
|
|
143
136
|
|
|
144
137
|
## Python 原版
|
|
145
138
|
|
|
146
139
|
Python 原版代码保留在 `../WeSpy/` 目录中,未被删除。详见 [MIGRATION.md](./MIGRATION.md)。
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT
|