mulmocast 0.0.13 → 0.0.15
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 +5 -1
- package/assets/html/pdf_handout.html +85 -0
- package/assets/html/pdf_slide.html +55 -0
- package/assets/html/pdf_talk.html +76 -0
- package/lib/actions/audio.d.ts +1 -0
- package/lib/actions/audio.js +8 -2
- package/lib/actions/images.d.ts +85 -1
- package/lib/actions/images.js +130 -88
- package/lib/actions/movie.d.ts +1 -0
- package/lib/actions/movie.js +14 -3
- package/lib/actions/pdf.d.ts +1 -0
- package/lib/actions/pdf.js +132 -202
- package/lib/agents/combine_audio_files_agent.js +10 -8
- package/lib/agents/image_mock_agent.d.ts +4 -0
- package/lib/agents/image_mock_agent.js +18 -0
- package/lib/agents/index.d.ts +3 -1
- package/lib/agents/index.js +3 -1
- package/lib/agents/media_mock_agent.d.ts +4 -0
- package/lib/agents/media_mock_agent.js +18 -0
- package/lib/agents/tts_openai_agent.js +9 -1
- package/lib/cli/commands/audio/builder.d.ts +2 -0
- package/lib/cli/commands/image/builder.d.ts +2 -0
- package/lib/cli/commands/movie/builder.d.ts +2 -0
- package/lib/cli/commands/pdf/builder.d.ts +2 -0
- package/lib/cli/commands/translate/builder.d.ts +2 -0
- package/lib/cli/common.d.ts +2 -0
- package/lib/cli/common.js +5 -0
- package/lib/cli/helpers.js +1 -0
- package/lib/methods/mulmo_script.d.ts +1 -1
- package/lib/methods/mulmo_script.js +2 -2
- package/lib/types/type.d.ts +1 -0
- package/lib/utils/filters.js +1 -0
- package/lib/utils/markdown.js +1 -1
- package/package.json +7 -8
- package/assets/font/NotoSansJP-Regular.ttf +0 -0
|
@@ -6,6 +6,6 @@ export declare const MulmoScriptMethods: {
|
|
|
6
6
|
getAllSpeechProviders(script: MulmoScript): Set<Text2SpeechProvider>;
|
|
7
7
|
getTextSlideStyle(script: MulmoScript, beat: MulmoBeat): string;
|
|
8
8
|
getSpeechOptions(script: MulmoScript, beat: MulmoBeat): SpeechOptions | undefined;
|
|
9
|
-
getImageAgentInfo(script: MulmoScript): Text2ImageAgentInfo;
|
|
9
|
+
getImageAgentInfo(script: MulmoScript, dryRun?: boolean): Text2ImageAgentInfo;
|
|
10
10
|
getImageType(_: MulmoScript, beat: MulmoBeat): BeatMediaType;
|
|
11
11
|
};
|
|
@@ -40,7 +40,7 @@ export const MulmoScriptMethods = {
|
|
|
40
40
|
getSpeechOptions(script, beat) {
|
|
41
41
|
return { ...script.speechParams.speakers[beat.speaker].speechOptions, ...beat.speechOptions };
|
|
42
42
|
},
|
|
43
|
-
getImageAgentInfo(script) {
|
|
43
|
+
getImageAgentInfo(script, dryRun = false) {
|
|
44
44
|
// Notice that we copy imageParams from script and update
|
|
45
45
|
// provider and model appropriately.
|
|
46
46
|
const provider = text2ImageProviderSchema.parse(script.imageParams?.provider);
|
|
@@ -49,7 +49,7 @@ export const MulmoScriptMethods = {
|
|
|
49
49
|
};
|
|
50
50
|
return {
|
|
51
51
|
provider,
|
|
52
|
-
agent: provider === "google" ? "imageGoogleAgent" : "imageOpenaiAgent",
|
|
52
|
+
agent: dryRun ? "mediaMockAgent" : provider === "google" ? "imageGoogleAgent" : "imageOpenaiAgent",
|
|
53
53
|
imageParams: { ...defaultImageParams, ...script.imageParams },
|
|
54
54
|
};
|
|
55
55
|
},
|
package/lib/types/type.d.ts
CHANGED
package/lib/utils/filters.js
CHANGED
package/lib/utils/markdown.js
CHANGED
|
@@ -24,7 +24,7 @@ export const renderHTMLToImage = async (html, outputPath, width, height, isMerma
|
|
|
24
24
|
export const renderMarkdownToImage = async (markdown, style, outputPath, width, height) => {
|
|
25
25
|
const header = `<head><style>${style}</style></head>`;
|
|
26
26
|
const body = await marked(markdown);
|
|
27
|
-
const html = `<
|
|
27
|
+
const html = `<html>${header}<body>${body}</body></html>`;
|
|
28
28
|
await renderHTMLToImage(html, outputPath, width, height);
|
|
29
29
|
};
|
|
30
30
|
export const interpolate = (template, data) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"./assets/music/StarsBeyondEx.mp3",
|
|
14
14
|
"./assets/audio/silent60sec.mp3",
|
|
15
15
|
"./assets/html/",
|
|
16
|
-
"./assets/font/",
|
|
17
16
|
"./assets/templates/"
|
|
18
17
|
],
|
|
19
18
|
"types": "./lib/types/index.d.ts",
|
|
@@ -59,17 +58,15 @@
|
|
|
59
58
|
"@graphai/stream_agent_filter": "^2.0.2",
|
|
60
59
|
"@graphai/vanilla": "^2.0.4",
|
|
61
60
|
"@graphai/vanilla_node_agents": "^2.0.1",
|
|
62
|
-
"@pdf-lib/fontkit": "^1.1.1",
|
|
63
61
|
"canvas": "^3.1.0",
|
|
64
62
|
"clipboardy": "^4.0.0",
|
|
65
63
|
"dotenv": "^16.4.7",
|
|
66
64
|
"fluent-ffmpeg": "^2.1.3",
|
|
67
65
|
"google-auth-library": "^9.15.1",
|
|
68
|
-
"graphai": "^2.0.
|
|
66
|
+
"graphai": "^2.0.6",
|
|
69
67
|
"inquirer": "^12.6.1",
|
|
70
68
|
"marked": "^15.0.12",
|
|
71
69
|
"ora": "^8.2.0",
|
|
72
|
-
"pdf-lib": "^1.17.1",
|
|
73
70
|
"puppeteer": "^24.10.0",
|
|
74
71
|
"yaml": "^2.8.0",
|
|
75
72
|
"yargs": "^17.7.2",
|
|
@@ -77,17 +74,19 @@
|
|
|
77
74
|
"zod-to-json-schema": "^3.24.5"
|
|
78
75
|
},
|
|
79
76
|
"devDependencies": {
|
|
77
|
+
"@anatine/zod-mock": "^3.14.0",
|
|
78
|
+
"@faker-js/faker": "^9.8.0",
|
|
80
79
|
"@receptron/test_utils": "^2.0.0",
|
|
81
80
|
"@types/fluent-ffmpeg": "^2.1.26",
|
|
82
81
|
"@types/yargs": "^17.0.33",
|
|
83
|
-
"eslint": "^9.
|
|
82
|
+
"eslint": "^9.29.0",
|
|
84
83
|
"eslint-config-prettier": "^10.1.5",
|
|
85
84
|
"eslint-plugin-prettier": "^5.4.1",
|
|
86
85
|
"prettier": "^3.3.3",
|
|
87
86
|
"ts-node": "^10.9.2",
|
|
88
|
-
"tsx": "^4.
|
|
87
|
+
"tsx": "^4.20.3",
|
|
89
88
|
"typescript": "^5.7.3",
|
|
90
|
-
"typescript-eslint": "^8.
|
|
89
|
+
"typescript-eslint": "^8.34.0"
|
|
91
90
|
},
|
|
92
91
|
"engines": {
|
|
93
92
|
"node": ">=16.0.0"
|
|
Binary file
|