implement u2v command

This commit is contained in:
tocariimaa 2024-12-30 00:45:36 -03:00
parent 805e0d5894
commit 40fc4774ff

15
main.go
View file

@ -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() {