1
1
Fork 0
mirror of https://github.com/go-shiori/shiori.git synced 2025-01-29 11:19:21 +08:00
shiori/internal/cmd/add.go
2019-05-21 10:31:40 +07:00

20 lines
555 B
Go

package cmd
import (
"github.com/spf13/cobra"
)
func addCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "add url",
Short: "Bookmark the specified URL",
Args: cobra.ExactArgs(1),
}
cmd.Flags().StringP("title", "i", "", "Custom title for this bookmark.")
cmd.Flags().StringP("excerpt", "e", "", "Custom excerpt for this bookmark.")
cmd.Flags().StringSliceP("tags", "t", []string{}, "Comma-separated tags for this bookmark.")
cmd.Flags().BoolP("offline", "o", false, "Save bookmark without fetching data from internet.")
return cmd
}