Skip to content

Commit

Permalink
feat(dl): chat mode. WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
iyear committed Sep 13, 2022
1 parent 0496e31 commit 22d1816
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/dl/dlchat/chat.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package dlchat

import "context"

func Run(ctx context.Context, ns, proxy string, partSize, threads, limit int, chat string, from, to int) error {

}
35 changes: 35 additions & 0 deletions cmd/dl/chat.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package dl

import (
"github.com/iyear/tdl/app/dl/dlchat"
"github.com/spf13/cobra"
)

var (
chat string
from, to int
)

var cmdChat = &cobra.Command{
Use: "chat",
Short: "Download in chat mode",
Example: "tdl dl chat ",
RunE: func(cmd *cobra.Command, args []string) error {
proxy, err := cmd.Flags().GetString("proxy")
if err != nil {
return err
}

ns, err := cmd.Flags().GetString("ns")
if err != nil {
return err
}

return dlchat.Run(cmd.Context(), ns, proxy, partSize, threads, limit)
},
}

func init() {
cmdChat.Flags().StringVarP(&chat, "chat", "c", "", "accp")
cmdChat.Flags().IntVar(&from, "from", 0)
}

0 comments on commit 22d1816

Please sign in to comment.