Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
moqsien committed Mar 28, 2024
1 parent 0ad1b79 commit f1f8829
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion cmd/asciinema.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package cmd

import (
"fmt"

"github.com/gvcgo/goutils/pkgs/gtea/gprint"
"github.com/gvcgo/gvc/pkg/asciinema"
"github.com/gvcgo/gvc/pkg/repo"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -79,7 +83,22 @@ func RegisterAsciinema(cli *Cli) {
cmd.Help()
return
}
ascer.ConvertToGif(args[0], args[1])
err := ascer.ConvertToGif(args[0], args[1])
if err == nil {
var repoType string
fmt.Println(gprint.CyanStr("Upload gif to remote repo?"))
fmt.Println(gprint.CyanStr("1) github."))
fmt.Println(gprint.CyanStr("2) gitee."))
fmt.Println(gprint.CyanStr("3) abort."))
fmt.Scanln(&repoType)
if repoType == "1" {
repo.UploadPics(repo.RepoGithub, args[1])
} else if repoType == "2" {
repo.UploadPics(repo.RepoGitee, args[1])
} else {
return
}
}
},
}
parent.AddCommand(convert)
Expand Down

0 comments on commit f1f8829

Please sign in to comment.