Update README file and cobra descriptions
This commit is contained in:
parent
ababeaacf8
commit
4a9b568f6c
|
@ -8,12 +8,12 @@ ytdl-web [OPTIONS]
|
|||
|
||||
Available options:
|
||||
|
||||
- -b, --base-path string the base path, used when behind reverse proxy (default is "")
|
||||
- -b, --base-path string the base path, used when behind reverse proxy
|
||||
- --config string config file (default is $XDG_CONFIG_HOME/ytdl-web/config.yml)
|
||||
- -h, --help help for ytdl-web
|
||||
- -l, --listen string address to listen on (default is 127.0.0.1) (default "127.0.0.1")
|
||||
- -p, --port int port to listen on (default is 8080) (default 8080)
|
||||
- -y, --ytdlp-path string the path to the yt-dlp binary, used when it is not in $PATH (default is yt-dlp) (default "yt-dlp")
|
||||
- -l, --listen string address to listen on (default "127.0.0.1")
|
||||
- -p, --port int port to listen on (default 8080)
|
||||
- -y, --ytdlp-path string the path to the yt-dlp binary, used when it is not in $PATH (default "yt-dlp")
|
||||
|
||||
## Building from source
|
||||
|
||||
|
|
16
cmd/root.go
16
cmd/root.go
|
@ -20,12 +20,10 @@ var (
|
|||
rootCmd = &cobra.Command{
|
||||
Use: "ytdl-web",
|
||||
Short: "A web frontend for yt-dlp",
|
||||
Long: `A longer description that spans multiple lines and likely contains
|
||||
examples and usage of using your application. For example:
|
||||
Long: `YTDL Web
|
||||
|
||||
Cobra is a CLI library for Go that empowers applications.
|
||||
This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
A web application that grabs the links to videos from over a
|
||||
thousand websites using the yt-dlp project under the hood.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := web.Serve(); err != nil {
|
||||
slog.Error("Error when serving website", slog.String("error", err.Error()))
|
||||
|
@ -46,10 +44,10 @@ func init() {
|
|||
|
||||
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $XDG_CONFIG_HOME/ytdl-web/config.yml)")
|
||||
|
||||
rootCmd.PersistentFlags().IntP("port", "p", 8080, "port to listen on (default is 8080)")
|
||||
rootCmd.PersistentFlags().StringP("listen", "l", "127.0.0.1", "address to listen on (default is 127.0.0.1)")
|
||||
rootCmd.PersistentFlags().StringP("base-path", "b", "", "the base path, used when behind reverse proxy (default is \"\")")
|
||||
rootCmd.PersistentFlags().StringP("ytdlp-path", "y", "yt-dlp", "the path to the yt-dlp binary, used when it is not in $PATH (default is yt-dlp)")
|
||||
rootCmd.PersistentFlags().IntP("port", "p", 8080, "port to listen on")
|
||||
rootCmd.PersistentFlags().StringP("listen", "l", "127.0.0.1", "address to listen on")
|
||||
rootCmd.PersistentFlags().StringP("base-path", "b", "", "the base path, used when behind reverse proxy")
|
||||
rootCmd.PersistentFlags().StringP("ytdlp-path", "y", "yt-dlp", "the path to the yt-dlp binary, used when it is not in $PATH")
|
||||
|
||||
// trunk-ignore-begin(golangci-lint/errcheck): Ignoring errors
|
||||
viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port"))
|
||||
|
|
Loading…
Reference in New Issue