Add cli generated docs inside docs/generated
This commit is contained in:
parent
063e980280
commit
f21a627a71
15 changed files with 226 additions and 1 deletions
|
@ -64,7 +64,14 @@ ente account update --email email@domain.com --dir ~/photos
|
|||
ente export
|
||||
```
|
||||
|
||||
---
|
||||
### CLI Docs
|
||||
You can view more cli documents at [docs](docs/generated/ente.md).
|
||||
To update the docs, run the following command:
|
||||
|
||||
```shell
|
||||
go run main.go docs
|
||||
```
|
||||
|
||||
|
||||
## Docker
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package cmd
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/ente-io/cli/pkg"
|
||||
"github.com/spf13/cobra/doc"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
|
@ -27,6 +28,10 @@ var rootCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func GenerateDocs() error {
|
||||
return doc.GenMarkdownTree(rootCmd, "./docs/generated")
|
||||
}
|
||||
|
||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
||||
// This is called by main.main(). It only needs to happen once to the rootCmd.
|
||||
func Execute(controller *pkg.ClICtrl) {
|
||||
|
|
27
cli/docs/generated/ente.md
Normal file
27
cli/docs/generated/ente.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
## ente
|
||||
|
||||
CLI tool for exporting your photos from ente.io
|
||||
|
||||
### Synopsis
|
||||
|
||||
Start by creating a config file in your home directory:
|
||||
|
||||
```
|
||||
ente [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for ente
|
||||
-t, --toggle Help message for toggle
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente account](ente_account.md) - Manage account settings
|
||||
* [ente auth](ente_auth.md) - Authenticator commands
|
||||
* [ente export](ente_export.md) - Starts the export process
|
||||
* [ente version](ente_version.md) - Prints the current version
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
19
cli/docs/generated/ente_account.md
Normal file
19
cli/docs/generated/ente_account.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## ente account
|
||||
|
||||
Manage account settings
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for account
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente](ente.md) - CLI tool for exporting your photos from ente.io
|
||||
* [ente account add](ente_account_add.md) - Add a new account
|
||||
* [ente account get-token](ente_account_get-token.md) - Get token for an account for a specific app
|
||||
* [ente account list](ente_account_list.md) - list configured accounts
|
||||
* [ente account update](ente_account_update.md) - Update an existing account's export directory
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
19
cli/docs/generated/ente_account_add.md
Normal file
19
cli/docs/generated/ente_account_add.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## ente account add
|
||||
|
||||
Add a new account
|
||||
|
||||
```
|
||||
ente account add [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for add
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente account](ente_account.md) - Manage account settings
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
21
cli/docs/generated/ente_account_get-token.md
Normal file
21
cli/docs/generated/ente_account_get-token.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
## ente account get-token
|
||||
|
||||
Get token for an account for a specific app
|
||||
|
||||
```
|
||||
ente account get-token [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--app string Specify the app, default is 'photos' (default "photos")
|
||||
--email string email address of the account
|
||||
-h, --help help for get-token
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente account](ente_account.md) - Manage account settings
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
19
cli/docs/generated/ente_account_list.md
Normal file
19
cli/docs/generated/ente_account_list.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## ente account list
|
||||
|
||||
list configured accounts
|
||||
|
||||
```
|
||||
ente account list [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for list
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente account](ente_account.md) - Manage account settings
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
22
cli/docs/generated/ente_account_update.md
Normal file
22
cli/docs/generated/ente_account_update.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
## ente account update
|
||||
|
||||
Update an existing account's export directory
|
||||
|
||||
```
|
||||
ente account update [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--app string Specify the app, default is 'photos' (default "photos")
|
||||
--dir string update export directory
|
||||
--email string email address of the account
|
||||
-h, --help help for update
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente account](ente_account.md) - Manage account settings
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
16
cli/docs/generated/ente_auth.md
Normal file
16
cli/docs/generated/ente_auth.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
## ente auth
|
||||
|
||||
Authenticator commands
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for auth
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente](ente.md) - CLI tool for exporting your photos from ente.io
|
||||
* [ente auth decrypt](ente_auth_decrypt.md) - Decrypt authenticator export
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
19
cli/docs/generated/ente_auth_decrypt.md
Normal file
19
cli/docs/generated/ente_auth_decrypt.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## ente auth decrypt
|
||||
|
||||
Decrypt authenticator export
|
||||
|
||||
```
|
||||
ente auth decrypt [input] [output] [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for decrypt
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente auth](ente_auth.md) - Authenticator commands
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
19
cli/docs/generated/ente_export.md
Normal file
19
cli/docs/generated/ente_export.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## ente export
|
||||
|
||||
Starts the export process
|
||||
|
||||
```
|
||||
ente export [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for export
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente](ente.md) - CLI tool for exporting your photos from ente.io
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
19
cli/docs/generated/ente_version.md
Normal file
19
cli/docs/generated/ente_version.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
## ente version
|
||||
|
||||
Prints the current version
|
||||
|
||||
```
|
||||
ente version [flags]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for version
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [ente](ente.md) - CLI tool for exporting your photos from ente.io
|
||||
|
||||
###### Auto generated by spf13/cobra on 8-Mar-2024
|
|
@ -12,10 +12,12 @@ require (
|
|||
|
||||
require (
|
||||
github.com/alessio/shellescape v1.4.1 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/danieljoos/wincred v1.2.0 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
|
@ -48,6 +48,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
|
|||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE=
|
||||
github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec=
|
||||
|
@ -168,6 +169,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
|
|||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
|
||||
github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
|
||||
|
|
|
@ -64,6 +64,15 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
if len(os.Args) == 2 && os.Args[1] == "docs" {
|
||||
log.Println("Generating docs")
|
||||
err = cmd.GenerateDocs()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
cmd.Execute(&ctrl)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue