@lemonppt/cli 0.1.0 → 0.1.1
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/SKILL.md +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -4
- package/package.json +5 -5
package/SKILL.md
CHANGED
|
@@ -20,7 +20,7 @@ lemonppt generate "<主题>" --pages <页数> --theme <主题> --language zh --o
|
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
- `--pages`:页数,建议 6~20 页
|
|
23
|
-
- `--theme`:主题 ID,可选 `
|
|
23
|
+
- `--theme`:主题 ID,可选 `base`、`dark-tech`、`warm-business`
|
|
24
24
|
- `--language`:`zh` 或 `en`
|
|
25
25
|
- `--api-key`:可选,OpenAI 兼容 API Key;不传则使用内置 fallback 示例
|
|
26
26
|
|
|
@@ -46,7 +46,7 @@ lemonppt export ./goal.json --pptx ./deck.pptx --pdf ./deck.pdf
|
|
|
46
46
|
"goal": "演示目标",
|
|
47
47
|
"audience": "目标受众",
|
|
48
48
|
"owner": "汇报人",
|
|
49
|
-
"theme": "
|
|
49
|
+
"theme": "base",
|
|
50
50
|
"language": "zh",
|
|
51
51
|
"pageCount": 8,
|
|
52
52
|
"randomSeed": "可选种子",
|
|
@@ -90,7 +90,7 @@ lemonppt export ./goal.json --pptx ./deck.pptx --pdf ./deck.pdf
|
|
|
90
90
|
|
|
91
91
|
| 主题 ID | 风格 |
|
|
92
92
|
|---|---|
|
|
93
|
-
| `
|
|
93
|
+
| `base` | 极简商务 |
|
|
94
94
|
| `dark-tech` | 深色科技 |
|
|
95
95
|
| `warm-business` | 温暖商务 |
|
|
96
96
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { generateGoal } from '@lemonppt/agent-prompts';
|
|
2
|
+
import { normalizeDeckGoal } from '@lemonppt/core';
|
|
2
3
|
import { exportDeckToPdf, exportDeckToPptx, renderDeck, } from '@lemonppt/renderer';
|
|
3
4
|
import { getTheme } from '@lemonppt/themes';
|
|
4
5
|
import { copyFile, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
5
6
|
import path from 'node:path';
|
|
6
7
|
import { fileURLToPath } from 'node:url';
|
|
7
8
|
function resolveTheme(themeId) {
|
|
8
|
-
const id = themeId || '
|
|
9
|
-
return getTheme(id) ? id : '
|
|
9
|
+
const id = themeId || 'base';
|
|
10
|
+
return getTheme(id) ? id : 'base';
|
|
10
11
|
}
|
|
11
12
|
async function copyThemeAssets(themeId, assetsDir) {
|
|
12
13
|
const theme = resolveTheme(themeId);
|
|
@@ -24,7 +25,7 @@ function resolvePackagePath(pkg, ...segments) {
|
|
|
24
25
|
* 生成 goal.json 并可选写入文件。
|
|
25
26
|
*/
|
|
26
27
|
export async function generateGoalToFile(options) {
|
|
27
|
-
const { input, pageCount = 8, theme = '
|
|
28
|
+
const { input, pageCount = 8, theme = 'base', language = 'zh', apiKey, baseUrl, model, outFile, } = options;
|
|
28
29
|
const result = await generateGoal({
|
|
29
30
|
input,
|
|
30
31
|
pageCount,
|
|
@@ -49,7 +50,7 @@ export async function readGoalFromFile(filePath) {
|
|
|
49
50
|
const raw = await readFile(path.resolve(filePath), 'utf-8');
|
|
50
51
|
const parsed = JSON.parse(raw);
|
|
51
52
|
parsed.theme = resolveTheme(parsed.theme);
|
|
52
|
-
return parsed;
|
|
53
|
+
return normalizeDeckGoal(parsed);
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* 渲染 deck 到输出目录。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemonppt/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://github.com/lemonforme/lemonPPT#readme",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lemonppt/agent-prompts": "0.1.
|
|
34
|
-
"@lemonppt/core": "0.1.
|
|
35
|
-
"@lemonppt/themes": "0.1.
|
|
36
|
-
"@lemonppt/renderer": "0.1.
|
|
33
|
+
"@lemonppt/agent-prompts": "0.1.1",
|
|
34
|
+
"@lemonppt/core": "0.1.1",
|
|
35
|
+
"@lemonppt/themes": "0.1.1",
|
|
36
|
+
"@lemonppt/renderer": "0.1.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^20.0.0",
|