dsh-plugin-office-fill-tool 0.2.0 → 0.2.2
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/LICENSE +21 -0
- package/README.md +43 -45
- package/package.json +6 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tenfeng
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,75 +1,73 @@
|
|
|
1
|
-
# office
|
|
1
|
+
# dsh-plugin-office-fill-tool
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DeepSeek Harness(DSH)插件:根据 Excel/Word 模板和数据台账批量生成文件,并向模型返回生成的文件列表。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 功能
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- `bin/office fill tool.exe` + `bin/_internal/`:PyInstaller onedir 程序,同时支持 GUI 和 `--cli` 模式。
|
|
7
|
+
- `batch_generate_files`:传入 `template`、`data`、`output_dir`、`mode`,后台生成并返回 `folder` / `count` / `files`。
|
|
8
|
+
- `open_office_fill_tool`:打开 Windows 图形界面,手动操作。
|
|
9
|
+
- 支持 Excel(`.xlsx`)和 Word(`.docx`)模板。
|
|
10
|
+
- 保留模板的单元格边框、行级格式、合并单元格等格式。
|
|
12
11
|
|
|
13
12
|
## 安装
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
要求:Windows、DSH 版本 `>= 0.2.1-rc.2`。
|
|
15
|
+
|
|
16
|
+
```powershell
|
|
17
|
+
dsh plugin --profile desktop add github:ten-feng/dsh-plugin-office-fill-tool
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
安装后重启 DSH,在插件页应看到 `office fill tool`。
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
# npm(先 pnpm publish)
|
|
24
|
-
dsh plugin --profile desktop add dsh-plugin-office-fill-tool
|
|
22
|
+
也可以使用本地目录或 tarball 安装:
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
dsh plugin --profile desktop add .\dsh-plugin-office-fill-tool-0.
|
|
24
|
+
```powershell
|
|
25
|
+
dsh plugin --profile desktop add "C:\path\to\dsh-plugin-office-fill-tool"
|
|
26
|
+
dsh plugin --profile desktop add .\dsh-plugin-office-fill-tool-0.2.0.tgz
|
|
29
27
|
```
|
|
30
28
|
|
|
31
|
-
##
|
|
29
|
+
## 使用示例
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
在 DSH 对话中:
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| `mode` | 否 | `excel`(默认)或 `word` |
|
|
33
|
+
> 用 batch_generate_files 生成文件:
|
|
34
|
+
> template = C:\...\模板.xlsx
|
|
35
|
+
> data = C:\...\台账.xlsx
|
|
36
|
+
> output_dir = C:\...\输出
|
|
37
|
+
> mode = excel
|
|
41
38
|
|
|
42
39
|
返回:
|
|
43
40
|
|
|
44
41
|
```json
|
|
45
42
|
{
|
|
46
|
-
"folder": "
|
|
43
|
+
"folder": "C:\\...\\输出\\生成文件_20261025",
|
|
47
44
|
"count": 9,
|
|
48
|
-
"files": ["
|
|
45
|
+
"files": ["C:\\...\\A区.xlsx", "C:\\...\\B区.xlsx"]
|
|
49
46
|
}
|
|
50
47
|
```
|
|
51
48
|
|
|
52
|
-
|
|
49
|
+
## 目录结构
|
|
53
50
|
|
|
54
51
|
```text
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
.
|
|
53
|
+
├─ package.json
|
|
54
|
+
├─ index.js
|
|
55
|
+
├─ cordis.patch.yml
|
|
56
|
+
├─ README.md
|
|
57
|
+
├─ LICENSE
|
|
58
|
+
└─ bin/
|
|
59
|
+
├─ office fill tool.exe
|
|
60
|
+
└─ _internal/
|
|
59
61
|
```
|
|
60
62
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
```bat
|
|
64
|
-
"office fill tool.exe" --cli --mode excel ^
|
|
65
|
-
--template "模板.xlsx" --data "台账.xlsx" ^
|
|
66
|
-
--output "输出目录" --result-file "result.json"
|
|
67
|
-
```
|
|
63
|
+
## 限制
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
- 仅 Windows 可用(exe 为 Windows 程序)。
|
|
66
|
+
- 生成配置和日志写在 `bin/` 目录。
|
|
67
|
+
- 第一次调用时 DSH 需要能执行本机 exe,部分安全软件可能拦截。
|
|
70
68
|
|
|
71
|
-
##
|
|
69
|
+
## 卸载
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
```powershell
|
|
72
|
+
dsh plugin --profile desktop remove dsh-plugin-office-fill-tool
|
|
73
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-office-fill-tool",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Batch-generate Office files from templates and data ledgers, returning the generated file list.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -28,5 +28,10 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@deepseek-ai/dsh-tools": "*"
|
|
30
30
|
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/ten-feng/dsh-plugin-office-fill-tool.git"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://github.com/ten-feng/dsh-plugin-office-fill-tool#readme",
|
|
31
36
|
"license": "MIT"
|
|
32
37
|
}
|