MCPcopy Index your code
hub / github.com/cloudconvert/cloudconvert-cli / buildCommandOptions

Function buildCommandOptions

src/commands/command.ts:38–76  ·  view source on GitHub ↗
(argv: Argv<object>)

Source from the content-addressed store, hash-verified

36}
37
38function buildCommandOptions(argv: Argv<object>): Argv<object> {
39 return addTaskParameterMiddleware(
40 argv
41 .positional('files', {
42 description: 'Path(s) to file(s) to make available under /input/'
43 })
44 .option('engine', {
45 choices: ['ffmpeg', 'imagemagick', 'graphicsmagick'] as const,
46 describe: 'Set the command execution engine',
47 demandOption: true
48 })
49 .option('command', {
50 describe: 'Set the executable command, such as ffmpeg',
51 type: 'string',
52 demandOption: true
53 })
54 .option('arguments', {
55 describe: 'Set the command arguments. Use /input/upload-0/ and /output/ paths',
56 type: 'string',
57 demandOption: true
58 })
59 .option('capture-output', {
60 describe: 'Capture and print command output',
61 type: 'boolean',
62 default: true
63 })
64 .example(
65 'cloudconvert command --engine=ffmpeg --command=ffmpeg --arguments="-i /input/upload-0/input.mp4 -vcodec libx264 -acodec copy /output/output.mp4" input.mp4',
66 ''
67 )
68 .example(
69 'cloudconvert command --engine=imagemagick --command=convert --arguments="/input/upload-0/input.png -resize 50% /output/output.png" input.png',
70 ''
71 )
72 )
73 .help()
74 .hide('version')
75 .epilogue('Find possible task parameters with: cloudconvert parameters command');
76}

Callers 1

createCommandCommandFunction · 0.85

Calls 1

Tested by

no test coverage detected