-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.ts
40 lines (37 loc) · 1.18 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { Flags } from "@oclif/core";
import SecureCommand from "../../secure";
export default class Summary extends SecureCommand {
static description = "Summarize any audio or video using just one command.";
static flags = {
"data-url": Flags.string({
description: "URL of an audio or video file",
summary: "https://dpgr.am/data-url",
exactlyOne: ["data-url", "data-binary"],
exclusive: ["mimetype"],
required: false,
helpGroup: "MEDIA SOURCE",
}),
"data-binary": Flags.string({
description: "Filepath of local audio or video file",
summary: "https://dpgr.am/data-binary",
exactlyOne: ["data-url", "data-binary"],
dependsOn: ["mimetype"],
required: false,
helpGroup: "MEDIA SOURCE",
}),
mimetype: Flags.string({
description: "Mimetype of local audio or video file",
required: false,
helpGroup: "MEDIA SOURCE",
}),
};
public async run(): Promise<void> {
const result = await this.config.runCommand("transcribe", [
"--summarize",
"--no-transcript",
...Object.entries(this.parsedFlags).map(
([flag, value]) => `--${flag}=${value}`
),
]);
}
}