implement u2v command
This commit is contained in:
parent
805e0d5894
commit
40fc4774ff
1 changed files with 14 additions and 1 deletions
15
main.go
15
main.go
|
@ -134,7 +134,20 @@ func downloadUgoiraCmd(args []string, flags CliFlags) {
|
|||
}
|
||||
|
||||
func ugoira2videoCmd(args []string, flags CliFlags) {
|
||||
|
||||
if len(args) < 2 {
|
||||
die("expected ugoira zip file and manifest JSON")
|
||||
}
|
||||
_, manifestFileName := args[0], args[1]
|
||||
mfp, err := os.Open(manifestFileName)
|
||||
if err != nil {
|
||||
die("Could not open manifest file: %s", err)
|
||||
}
|
||||
defer mfp.Close()
|
||||
manifestData, err := io.ReadAll(mfp)
|
||||
if err != nil {
|
||||
die("Could not read manifest: %s", err)
|
||||
}
|
||||
ugoira2video(decodeUgoiraManifest(manifestData))
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
|
Loading…
Add table
Reference in a new issue