docs: improve some cli docs
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>pull/620/head
parent
58edf878ab
commit
2ba5a4275a
|
@ -10,7 +10,8 @@ func init() {
|
||||||
|
|
||||||
var configExportCmd = &cobra.Command{
|
var configExportCmd = &cobra.Command{
|
||||||
Use: "export <filename>",
|
Use: "export <filename>",
|
||||||
Short: "Export the configuration to a file.",
|
Short: "Export the configuration to a file",
|
||||||
|
Long: "Export the configuration to a file.",
|
||||||
Args: jsonYamlArg,
|
Args: jsonYamlArg,
|
||||||
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
|
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
|
||||||
settings, err := d.store.Settings.Get()
|
settings, err := d.store.Settings.Get()
|
||||||
|
|
|
@ -23,7 +23,8 @@ type settingsFile struct {
|
||||||
|
|
||||||
var configImportCmd = &cobra.Command{
|
var configImportCmd = &cobra.Command{
|
||||||
Use: "import <filename>",
|
Use: "import <filename>",
|
||||||
Short: `Import a configuration file. This will replace all the existing
|
Short: "Import a configuration file",
|
||||||
|
Long: `Import a configuration file. This will replace all the existing
|
||||||
configuration. Can be used with or without unexisting databases.
|
configuration. Can be used with or without unexisting databases.
|
||||||
If used with a nonexisting database, a key will be generated
|
If used with a nonexisting database, a key will be generated
|
||||||
automatically. Otherwise the key will be kept the same as in the
|
automatically. Otherwise the key will be kept the same as in the
|
||||||
|
|
|
@ -119,6 +119,7 @@ The precedence of the configuration values are as follows:
|
||||||
- flag
|
- flag
|
||||||
- environment variable
|
- environment variable
|
||||||
- configuration file
|
- configuration file
|
||||||
|
- database values
|
||||||
- defaults
|
- defaults
|
||||||
|
|
||||||
The environment variables are prefixed by "FB_" followed by the option
|
The environment variables are prefixed by "FB_" followed by the option
|
||||||
|
|
|
@ -10,7 +10,9 @@ func init() {
|
||||||
|
|
||||||
var usersExportCmd = &cobra.Command{
|
var usersExportCmd = &cobra.Command{
|
||||||
Use: "export <filename>",
|
Use: "export <filename>",
|
||||||
Short: "Export all users.",
|
Short: "Export all users to a file.",
|
||||||
|
Long: `Export all users to a json or yaml file. Please indicate the
|
||||||
|
path to the file where you want to write the users.`,
|
||||||
Args: jsonYamlArg,
|
Args: jsonYamlArg,
|
||||||
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
|
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
|
||||||
list, err := d.store.Users.Gets("")
|
list, err := d.store.Users.Gets("")
|
||||||
|
|
|
@ -17,7 +17,8 @@ func init() {
|
||||||
|
|
||||||
var usersImportCmd = &cobra.Command{
|
var usersImportCmd = &cobra.Command{
|
||||||
Use: "import <filename>",
|
Use: "import <filename>",
|
||||||
Short: "Import users from a file.",
|
Short: "Import users from a file",
|
||||||
|
Long: "Import users from a file.",
|
||||||
Args: jsonYamlArg,
|
Args: jsonYamlArg,
|
||||||
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
|
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
|
||||||
fd, err := os.Open(args[0])
|
fd, err := os.Open(args[0])
|
||||||
|
|
Loading…
Reference in New Issue