diff --git a/cmd/build.go b/cmd/build.go index d4e2a63..f04f1ab 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -30,11 +30,11 @@ func init() { var buildCmd = &cobra.Command{ Use: "build [include-works]", Short: "Build the database", - Long: heredoc.Doc(`Scan in the projects directory for folders with description.md files (and potential media files) and compile the whole database into a JSON file at . + Long: heredoc.Doc(`Scan in the projects directory for folders with description.md files (and potential media files) and compile the whole database into a JSON file at to-filepath. - If is "-", the output will be written to stdout. + If to-filepath is "-", the output will be written to stdout. - If [include-works] is provided, only works that match the pattern will be included in the database. + If include-works is provided, only works that match the pattern will be included in the database. `), Args: cobra.RangeArgs(1, 2), Run: func(cmd *cobra.Command, args []string) { diff --git a/cmd/replicate.go b/cmd/replicate.go index 250e95f..4a7121a 100644 --- a/cmd/replicate.go +++ b/cmd/replicate.go @@ -13,13 +13,12 @@ var force bool var replicateCmd = &cobra.Command{ Use: "replicate ", Short: "Replicate a database directory from a built database file.", - Long: heredoc.Doc(`Replicate a database from to . Note that must be an empty directory. - - Example: ortfodb replicate ./database.json ./replicated-database/ + Long: heredoc.Doc(`Replicate a database from from-filepath to to-filepath. Note that to-filepath must be an empty directory. WARNING: This command is still kind-of a WIP, it works but there's minimal logging and error handling. `), - Args: cobra.ExactArgs(2), + Example: "Example: ortfodb replicate ./database.json ./replicated-database/", + Args: cobra.ExactArgs(2), Run: func(cmd *cobra.Command, args []string) { database, err := ortfodb.LoadDatabase(args[0], force) if err != nil { diff --git a/docs/commands/build.md b/docs/commands/build.md index 05ca5bc..46ab025 100644 --- a/docs/commands/build.md +++ b/docs/commands/build.md @@ -10,9 +10,9 @@ Build the database Scan in the projects directory for folders with description.md files (and potential media files) and compile the whole database into a JSON file at . -If is "-", the output will be written to stdout. +If to-filepath is "-", the output will be written to stdout. -If [include-works] is provided, only works that match the pattern will be included in the database. +If include-works is provided, only works that match the pattern will be included in the database. ``` diff --git a/docs/commands/replicate.md b/docs/commands/replicate.md index 3af5024..5cf5863 100644 --- a/docs/commands/replicate.md +++ b/docs/commands/replicate.md @@ -8,9 +8,7 @@ Replicate a database directory from a built database file. ## Synopsis -Replicate a database from to . Note that must be an empty directory. - -Example: ortfodb replicate ./database.json ./replicated-database/ +Replicate a database from from-filepath to to-filepath. Note that to-filepath must be an empty directory. WARNING: This command is still kind-of a WIP, it works but there's minimal logging and error handling. @@ -19,6 +17,12 @@ WARNING: This command is still kind-of a WIP, it works but there's minimal loggi ortfodb replicate [flags] ``` +## Examples + +```ansi +Example: ortfodb replicate ./database.json ./replicated-database/ +``` + ## Options | Shorthand | Flag | Argument | Description | Default value | diff --git a/manpages/ortfodb-build.1 b/manpages/ortfodb-build.1 index b674991..f9f0c13 100644 --- a/manpages/ortfodb-build.1 +++ b/manpages/ortfodb-build.1 @@ -16,10 +16,10 @@ ortfodb-build - Build the database Scan in the projects directory for folders with description.md files (and potential media files) and compile the whole database into a JSON file at \&. .PP -If is "-", the output will be written to stdout. +If to-filepath is "-", the output will be written to stdout. .PP -If [include-works] is provided, only works that match the pattern will be included in the database. +If include-works is provided, only works that match the pattern will be included in the database. .SH OPTIONS diff --git a/manpages/ortfodb-replicate.1 b/manpages/ortfodb-replicate.1 index 360d514..4e6a3e4 100644 --- a/manpages/ortfodb-replicate.1 +++ b/manpages/ortfodb-replicate.1 @@ -13,10 +13,7 @@ ortfodb-replicate - Replicate a database directory from a built database file. .SH DESCRIPTION .PP -Replicate a database from to \&. Note that must be an empty directory. - -.PP -Example: ortfodb replicate ./database.json ./replicated-database/ +Replicate a database from from-filepath to to-filepath. Note that to-filepath must be an empty directory. .PP WARNING: This command is still kind-of a WIP, it works but there's minimal logging and error handling. @@ -42,6 +39,13 @@ WARNING: This command is still kind-of a WIP, it works but there's minimal loggi Operate in scattered mode. In scattered mode, the description.md files are searched inside `.ortfo' folders in every folder of the database directory, instead of directly in the database directory's folders. See https://github.com/ortfo/ +.SH EXAMPLE +.EX +Example: ortfodb replicate ./database.json ./replicated-database/ + +.EE + + .SH SEE ALSO .PP \fBortfodb(1)\fP