Skip to content

Commit

Permalink
Merge pull request #3 from ChetanXpro/feat/autosub-cli
Browse files Browse the repository at this point in the history
feat: add cli support
  • Loading branch information
ChetanXpro authored Feb 16, 2024
2 parents 440c2e0 + 61a89fb commit 413d308
Show file tree
Hide file tree
Showing 9 changed files with 663 additions and 790 deletions.
21 changes: 21 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env node

const { program } = require('commander')
const { generate } = require('../dist')
program.name('autosub').version('1.0.0').description('Auto-generate subtitles for videos.')

program
.command('generate')
.description('Automatically generate subtitles for a video file')
.option('-i, --input <videoPath>', 'Path to the input video file')
.option('-o, --output <outputVideoPath>', 'Path to the output video file')
.action(options => {
const { input } = options
const { output } = options

if (!input) return console.log('Please provide a path to the input video file')

generate(input, output)
})

program.parse(process.argv)
Loading

0 comments on commit 413d308

Please sign in to comment.