@clipform/mcp-server 1.3.1 → 1.4.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 +12 -28
- package/dist/server.js +11 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/list-assets.d.ts +2 -0
- package/dist/tools/list-assets.js +45 -0
- package/dist/tools/list-assets.js.map +1 -0
- package/dist/tools/list-compositions.d.ts +2 -0
- package/dist/tools/list-compositions.js +30 -0
- package/dist/tools/list-compositions.js.map +1 -0
- package/dist/tools/render-composition.d.ts +2 -0
- package/dist/tools/render-composition.js +41 -0
- package/dist/tools/render-composition.js.map +1 -0
- package/dist/tools/search-music.d.ts +2 -0
- package/dist/tools/search-music.js +40 -0
- package/dist/tools/search-music.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Add to your `claude_desktop_config.json`:
|
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## Tools
|
|
33
33
|
|
|
34
34
|
### Form & question management
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ Add to your `claude_desktop_config.json`:
|
|
|
37
37
|
|------|-------------|
|
|
38
38
|
| `clipform_create_form` | Create a new form with questions in one call |
|
|
39
39
|
| `clipform_get_form` | View a form and all its questions |
|
|
40
|
-
| `clipform_update_form` | Change title, publish status, or settings
|
|
40
|
+
| `clipform_update_form` | Change title, publish status, or settings |
|
|
41
41
|
| `clipform_delete_form` | Delete an unclaimed form |
|
|
42
42
|
| `clipform_add_question` | Add a question to an existing form |
|
|
43
43
|
| `clipform_update_question` | Update question text, type, config, or options |
|
|
@@ -52,36 +52,20 @@ Add to your `claude_desktop_config.json`:
|
|
|
52
52
|
| `clipform_delete_question_media` | Remove media from a question |
|
|
53
53
|
| `clipform_attach_question_audio` | Attach audio to a still-image question |
|
|
54
54
|
| `clipform_set_question_logic` | Set branching logic on a question |
|
|
55
|
-
| `clipform_log_generation` | Save an audit trail for generated forms |
|
|
56
55
|
|
|
57
|
-
###
|
|
56
|
+
### Creative
|
|
58
57
|
|
|
59
58
|
| Tool | Description |
|
|
60
59
|
|------|-------------|
|
|
61
|
-
| `
|
|
60
|
+
| `clipform_render_composition` | Render a Remotion composition to MP4, PNG, or GIF |
|
|
61
|
+
| `clipform_generate_tts` | Generate narration audio with word-level captions |
|
|
62
|
+
| `clipform_generate_slideshow` | Create Ken Burns slideshow videos from images + audio |
|
|
63
|
+
| `clipform_search_media` | Search royalty-free images and videos |
|
|
64
|
+
| `clipform_search_music` | Search royalty-free music and ambient sounds |
|
|
65
|
+
| `clipform_list_compositions` | List available Remotion compositions and prop schemas |
|
|
66
|
+
| `clipform_list_assets` | List available sound effects, animations, and fonts |
|
|
62
67
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
### Guided prompts
|
|
66
|
-
|
|
67
|
-
| Prompt | Description |
|
|
68
|
-
|--------|-------------|
|
|
69
|
-
| `create-quiz` | Best practices for building scored quizzes with media (supports per-category scoring and knockouts) |
|
|
70
|
-
| `create-form` | Best practices for standard forms and surveys |
|
|
71
|
-
| `create-journo-request` | Turn a journalist's callout into a Clipform |
|
|
72
|
-
|
|
73
|
-
## Question types
|
|
74
|
-
|
|
75
|
-
- **choice** - Multiple choice with single or multiple selection
|
|
76
|
-
- **open** - Free-form text, audio, or video responses
|
|
77
|
-
- **contact** - Collect name, email, phone, company, and more
|
|
78
|
-
- **button** - Simple button for acknowledgment or navigation
|
|
79
|
-
- **binary** - Two-option choice (yes/no, true/false, this vs that)
|
|
80
|
-
- **scale** - Rating scale
|
|
81
|
-
- **external_link** - Redirect to an external URL
|
|
82
|
-
- **end_screen** - Customizable completion screen with score-based content (supports `score_ranges` for cumulative scoring and `scoring_results` for per-category recommendation quizzes)
|
|
83
|
-
|
|
84
|
-
## Example prompt
|
|
68
|
+
## Example
|
|
85
69
|
|
|
86
70
|
> Create a Clipform called "Customer Feedback" with a choice question asking "How would you rate our service?" with options Excellent, Good, Fair, Poor, then an open-ended question asking "Any additional comments?", and finish with an end screen saying "Thanks for your feedback!"
|
|
87
71
|
|
|
@@ -94,4 +78,4 @@ Forms are created with a start node and end screen automatically - you just add
|
|
|
94
78
|
## Links
|
|
95
79
|
|
|
96
80
|
- [Clipform](https://clipform.io) - Create interactive video forms
|
|
97
|
-
- [Documentation](https://clipform.io
|
|
81
|
+
- [Documentation](https://docs.clipform.io) - Full guide with question types, scoring, and more
|
package/dist/server.js
CHANGED
|
@@ -18,12 +18,17 @@ import { registerAttachQuestionAudioTool } from "./tools/attach-question-audio.j
|
|
|
18
18
|
import { registerLogGenerationTool } from "./tools/log-generation.js";
|
|
19
19
|
// Content research tools
|
|
20
20
|
import { registerSearchNewsTool } from "./tools/search-news.js";
|
|
21
|
+
// Creative tools
|
|
22
|
+
import { registerRenderCompositionTool } from "./tools/render-composition.js";
|
|
23
|
+
import { registerSearchMusicTool } from "./tools/search-music.js";
|
|
24
|
+
import { registerListCompositionsTool } from "./tools/list-compositions.js";
|
|
25
|
+
import { registerListAssetsTool } from "./tools/list-assets.js";
|
|
21
26
|
// Prompts
|
|
22
27
|
import { registerPrompts } from "./prompts.js";
|
|
23
28
|
export function createServer() {
|
|
24
29
|
const server = new McpServer({
|
|
25
30
|
name: "clipform-mcp-server",
|
|
26
|
-
version: "1.
|
|
31
|
+
version: "1.4.0",
|
|
27
32
|
});
|
|
28
33
|
// Form CRUD
|
|
29
34
|
registerCreateFormTool(server);
|
|
@@ -44,6 +49,11 @@ export function createServer() {
|
|
|
44
49
|
registerLogGenerationTool(server);
|
|
45
50
|
// Content research
|
|
46
51
|
registerSearchNewsTool(server);
|
|
52
|
+
// Creative tools
|
|
53
|
+
registerRenderCompositionTool(server);
|
|
54
|
+
registerSearchMusicTool(server);
|
|
55
|
+
registerListCompositionsTool(server);
|
|
56
|
+
registerListAssetsTool(server);
|
|
47
57
|
// Prompts
|
|
48
58
|
registerPrompts(server);
|
|
49
59
|
return server;
|
package/dist/server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,MAAM,CAAC,CAAC;IACrC,+BAA+B,CAAC,MAAM,CAAC,CAAC;IAExC,gBAAgB;IAChB,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAElC,mBAAmB;IACnB,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAE/B,iBAAiB;IACjB,6BAA6B,CAAC,MAAM,CAAC,CAAC;IACtC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAChC,4BAA4B,CAAC,MAAM,CAAC,CAAC;IACrC,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAE/B,UAAU;IACV,eAAe,CAAC,MAAM,CAAC,CAAC;IAExB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { callInternalApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
+
export function registerListAssetsTool(server) {
|
|
4
|
+
server.registerTool("clipform_list_assets", {
|
|
5
|
+
title: "List Assets",
|
|
6
|
+
description: `List available creative assets (sound effects, animations, fonts). Use this to discover what assets are available for use in compositions.`,
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: z.enum(["sfx", "animation", "font", "all"]).default("all").optional()
|
|
9
|
+
.describe("Asset type to list (default: all)"),
|
|
10
|
+
},
|
|
11
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
12
|
+
}, async ({ type }) => {
|
|
13
|
+
const result = await callInternalApi("/internal/creative/assets", {
|
|
14
|
+
method: "GET",
|
|
15
|
+
params: { type: type ?? "all" },
|
|
16
|
+
});
|
|
17
|
+
if (!result.ok)
|
|
18
|
+
return errorResult(result.error);
|
|
19
|
+
const data = result.data;
|
|
20
|
+
const lines = [];
|
|
21
|
+
if (data.sfx?.length) {
|
|
22
|
+
lines.push(`## Sound Effects (${data.sfx.length})\n`);
|
|
23
|
+
for (const sfx of data.sfx) {
|
|
24
|
+
lines.push(`- ${sfx.name}: ${sfx.description || sfx.path}`);
|
|
25
|
+
}
|
|
26
|
+
lines.push("");
|
|
27
|
+
}
|
|
28
|
+
if (data.animations?.length) {
|
|
29
|
+
lines.push(`## Animations (${data.animations.length})\n`);
|
|
30
|
+
for (const anim of data.animations) {
|
|
31
|
+
lines.push(`- ${anim.name}: ${anim.description || anim.path}`);
|
|
32
|
+
}
|
|
33
|
+
lines.push("");
|
|
34
|
+
}
|
|
35
|
+
if (data.fonts?.length) {
|
|
36
|
+
lines.push(`## Fonts (${data.fonts.length})\n`);
|
|
37
|
+
for (const font of data.fonts) {
|
|
38
|
+
lines.push(`- ${font.name}: weights ${font.weights?.join(", ") || "default"}`);
|
|
39
|
+
}
|
|
40
|
+
lines.push("");
|
|
41
|
+
}
|
|
42
|
+
return textResult(lines.length ? lines.join("\n") : "No assets found.");
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=list-assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-assets.js","sourceRoot":"","sources":["../../src/tools/list-assets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhF,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,4IAA4I;QACzJ,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;iBACxE,QAAQ,CAAC,mCAAmC,CAAC;SACjD;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAA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EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;YAChD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC9B,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;YACjF,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QAED,OAAO,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC1E,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { callInternalApi, errorResult, textResult } from "../lib/api-client.js";
|
|
2
|
+
export function registerListCompositionsTool(server) {
|
|
3
|
+
server.registerTool("clipform_list_compositions", {
|
|
4
|
+
title: "List Compositions",
|
|
5
|
+
description: `List all available Remotion compositions and their expected props schemas. Use this to discover what compositions can be rendered with clipform_render_composition.`,
|
|
6
|
+
inputSchema: {},
|
|
7
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
8
|
+
}, async () => {
|
|
9
|
+
const result = await callInternalApi("/internal/creative/compositions", {
|
|
10
|
+
method: "GET",
|
|
11
|
+
});
|
|
12
|
+
if (!result.ok)
|
|
13
|
+
return errorResult(result.error);
|
|
14
|
+
const compositions = result.data.compositions;
|
|
15
|
+
if (!compositions.length)
|
|
16
|
+
return textResult("No compositions found.");
|
|
17
|
+
const lines = [`Available compositions (${compositions.length}):\n`];
|
|
18
|
+
for (const comp of compositions) {
|
|
19
|
+
lines.push(`## ${comp.id}`);
|
|
20
|
+
lines.push(` Duration: ${comp.durationInFrames} frames @ ${comp.fps}fps (${(comp.durationInFrames / comp.fps).toFixed(1)}s)`);
|
|
21
|
+
lines.push(` Size: ${comp.width}x${comp.height}`);
|
|
22
|
+
if (comp.defaultProps) {
|
|
23
|
+
lines.push(` Default props: ${JSON.stringify(comp.defaultProps, null, 2)}`);
|
|
24
|
+
}
|
|
25
|
+
lines.push("");
|
|
26
|
+
}
|
|
27
|
+
return textResult(lines.join("\n"));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=list-compositions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-compositions.js","sourceRoot":"","sources":["../../src/tools/list-compositions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhF,MAAM,UAAU,4BAA4B,CAAC,MAAiB;IAC5D,MAAM,CAAC,YAAY,CACjB,4BAA4B,EAC5B;QACE,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,qKAAqK;QAClL,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;KACxG,EACD,KAAK,IAAI,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,iCAAiC,EAAE;YACtE,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,EAAE;YAAE,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEjD,MAAM,YAAY,GAAI,MAAM,CAAC,IAAY,CAAC,YAAqB,CAAC;QAChE,IAAI,CAAC,YAAY,CAAC,MAAM;YAAE,OAAO,UAAU,CAAC,wBAAwB,CAAC,CAAC;QAEtE,MAAM,KAAK,GAAG,CAAC,2BAA2B,YAAY,CAAC,MAAM,MAAM,CAAC,CAAC;QACrE,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,gBAAgB,aAAa,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC/H,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YACnD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACtB,KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YAC/E,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QACD,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { callInternalApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
+
export function registerRenderCompositionTool(server) {
|
|
4
|
+
server.registerTool("clipform_render_composition", {
|
|
5
|
+
title: "Render Composition",
|
|
6
|
+
description: `Render a Remotion composition to MP4, PNG, or GIF. Pass the composition ID and its expected props. Use clipform_list_compositions to discover available compositions and their prop schemas.
|
|
7
|
+
|
|
8
|
+
Output formats:
|
|
9
|
+
- mp4: Video file (H.264 codec, best for social media)
|
|
10
|
+
- png: Still image (single frame)
|
|
11
|
+
- gif: Animated GIF (looping)
|
|
12
|
+
|
|
13
|
+
The render runs server-side and returns the output file path.`,
|
|
14
|
+
inputSchema: {
|
|
15
|
+
compositionId: z.string().describe("The composition ID (e.g. 'ScorecardQuiz', 'ShortFormQuiz', 'PresenterDirected')"),
|
|
16
|
+
outputFormat: z.enum(["mp4", "png", "gif"]).default("mp4").describe("Output format (default: mp4)"),
|
|
17
|
+
inputProps: z.record(z.unknown()).optional().describe("Props object matching the composition's expected schema"),
|
|
18
|
+
},
|
|
19
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
20
|
+
}, async ({ compositionId, outputFormat, inputProps }) => {
|
|
21
|
+
const result = await callInternalApi("/internal/creative/render", {
|
|
22
|
+
body: {
|
|
23
|
+
compositionId,
|
|
24
|
+
outputFormat,
|
|
25
|
+
inputProps: inputProps ?? {},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
if (!result.ok)
|
|
29
|
+
return errorResult(result.error);
|
|
30
|
+
const data = result.data;
|
|
31
|
+
return textResult([
|
|
32
|
+
`Render complete.`,
|
|
33
|
+
``,
|
|
34
|
+
`Composition: ${compositionId}`,
|
|
35
|
+
`Format: ${data.format}`,
|
|
36
|
+
`Output: ${data.outputPath}`,
|
|
37
|
+
...(data.publicUrl ? [`Public URL: ${data.publicUrl}`] : []),
|
|
38
|
+
].join("\n"));
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=render-composition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-composition.js","sourceRoot":"","sources":["../../src/tools/render-composition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhF,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,YAAY,CACjB,6BAA6B,EAC7B;QACE,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE;;;;;;;8DAO2C;QACxD,WAAW,E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,0 +1,40 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { callInternalApi, errorResult, textResult } from "../lib/api-client.js";
|
|
3
|
+
export function registerSearchMusicTool(server) {
|
|
4
|
+
server.registerTool("clipform_search_music", {
|
|
5
|
+
title: "Search Music",
|
|
6
|
+
description: `Search for royalty-free music tracks and ambient sounds via Jamendo and Freesound. Returns download URLs for background music, quiz soundtracks, or ambient audio.`,
|
|
7
|
+
inputSchema: {
|
|
8
|
+
query: z.string().describe("What to search for (e.g. 'upbeat quiz background', 'calm ambient', 'playful pizzicato')"),
|
|
9
|
+
count: z.number().min(1).max(10).default(5).optional().describe("Max results (default: 5)"),
|
|
10
|
+
instrumentalOnly: z.boolean().optional().default(true).describe("Only instrumental tracks (default: true)"),
|
|
11
|
+
minDuration: z.number().optional().describe("Minimum duration in seconds"),
|
|
12
|
+
maxDuration: z.number().optional().describe("Maximum duration in seconds"),
|
|
13
|
+
tags: z.array(z.string()).optional().describe("Genre/mood tags to filter by"),
|
|
14
|
+
},
|
|
15
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
16
|
+
}, async ({ query, count, instrumentalOnly, minDuration, maxDuration, tags }) => {
|
|
17
|
+
const result = await callInternalApi("/internal/formgen/search-music", {
|
|
18
|
+
body: { query, count, instrumentalOnly, minDuration, maxDuration, tags },
|
|
19
|
+
});
|
|
20
|
+
if (!result.ok)
|
|
21
|
+
return errorResult(result.error);
|
|
22
|
+
const results = result.data.results;
|
|
23
|
+
if (!results.length)
|
|
24
|
+
return textResult(`No music found for "${query}".`);
|
|
25
|
+
const lines = [`Found ${results.length} tracks for "${query}":\n`];
|
|
26
|
+
for (const item of results) {
|
|
27
|
+
lines.push(`- ${item.title} by ${item.artist}`);
|
|
28
|
+
lines.push(` URL: ${item.url}`);
|
|
29
|
+
if (item.duration)
|
|
30
|
+
lines.push(` Duration: ${item.duration}s`);
|
|
31
|
+
if (item.source)
|
|
32
|
+
lines.push(` Source: ${item.source}`);
|
|
33
|
+
if (item.license)
|
|
34
|
+
lines.push(` License: ${item.license}`);
|
|
35
|
+
lines.push("");
|
|
36
|
+
}
|
|
37
|
+
return textResult(lines.join("\n"));
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=search-music.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-music.js","sourceRoot":"","sources":["../../src/tools/search-music.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhF,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,oKAAoK;QACjL,WAAW,EAAE;YACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yFAAyF,CAAC;YACrH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;YAC3F,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,0CAA0C,CAAC;YAC3G,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;YAC1E,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;YAC1E,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC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