Skip to content

Commit

Permalink
Config: Improve usage descriptions for backup options and flags #4243
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Mayer <michael@photoprism.app>
  • Loading branch information
lastzero committed May 19, 2024
1 parent 8396170 commit 6f00545
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/commands/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ var backupFlags = []cli.Flag{
},
cli.BoolFlag{
Name: "albums, a",
Usage: "create or update album YAML backup files in the album backup path",
Usage: "create YAML backup files for album metadata (in the standard backup path if no other path is specified)",
},
cli.StringFlag{
Name: "albums-path",
Usage: "custom album backup `PATH`",
},
cli.BoolFlag{
Name: "database, index, i",
Usage: "create a database backup in the database backup path with the date as filename, or write it to the specified file (stdout if - is passed as filename)",
Usage: "create index database backup (in the backup path with the date as filename if no filename is passed, or sent to stdout if - is passed as filename)",
},
cli.StringFlag{
Name: "database-path, index-path",
Expand Down
6 changes: 3 additions & 3 deletions internal/config/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var Flags = CliFlags{
}}, {
Flag: cli.BoolFlag{
Name: "sidecar-yaml",
Usage: "save originals metadata to YAML sidecar files",
Usage: "create YAML sidecar files to back up index metadata",
EnvVar: EnvVar("SIDECAR_YAML"),
}, DocDefault: "true"}, {
Flag: cli.StringFlag{
Expand Down Expand Up @@ -210,7 +210,7 @@ var Flags = CliFlags{
}, DocDefault: "true"}, {
Flag: cli.BoolFlag{
Name: "backup-albums",
Usage: "save album metadata to YAML backup files",
Usage: "create YAML backup files for album metadata",
EnvVar: EnvVar("BACKUP_ALBUMS"),
}, DocDefault: "true"}, {
Flag: cli.IntFlag{
Expand All @@ -221,7 +221,7 @@ var Flags = CliFlags{
}}, {
Flag: cli.StringFlag{
Name: "index-schedule",
Usage: "regular indexing `SCHEDULE` in cron format (e.g. \"0 */3 * * *\" or \"@every 3h\" for every 3 hours; leave empty to disable)",
Usage: "regular indexing `SCHEDULE` in cron format (e.g. \"@every 3h\" for every 3 hours; \"\" to disable)",
Value: DefaultIndexSchedule,
EnvVar: EnvVar("INDEX_SCHEDULE"),
}}, {
Expand Down
3 changes: 3 additions & 0 deletions pkg/report/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ func MarkdownTable(rows [][]string, cols []string, opt Options) string {
if strings.ContainsRune(rows[i][j], '|') {
rows[i][j] = strings.ReplaceAll(rows[i][j], "|", "\\|")
}
if strings.ContainsRune(rows[i][j], '*') {
rows[i][j] = strings.ReplaceAll(rows[i][j], "* * *", "\\* \\* \\*")
}
}
}
}
Expand Down

0 comments on commit 6f00545

Please sign in to comment.