Skip to content

Commit

Permalink
Update cli help
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-Friedrich committed Feb 3, 2024
1 parent 4b0d4a8 commit 7a689c3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,16 @@ CLI Usage
::

usage: musescore-manager [-h] [--print-completion {bash,zsh,tcsh}] [-V] [-b]
[--bail] [--catch-errors] [-k] [-C GENERAL_CONFIG_FILE]
[-d] [-m] [--diff] [-e FILE_PATH] [-v] [-E <extension>]
[--bail] [--catch-errors] [-k] [-C <file-path>] [-d]
[-m] [--diff] [-e FILE_PATH] [-v] [-E <extension>]
[--compress] [-c META_CLEAN] [-D]
[-i <source-fields> <format-string>] [-j]
[-l <log-file> <format-string>] [-y]
[-S DESTINATION_FIELD FORMAT_STRING]
[-S <field> <format-string>]
[--metatag <field> <value>] [--vbox <field> <value>]
[--title <string>] [--subtitle <string>]
[--composer <string>] [--lyricist <string>]
[-x LYRICS_EXTRACT] [-r LYRICS_REMAP] [-F]
[-x <number-or-all>] [-r <remap-pairs>] [-F]
[--rename <path-template>]
[-t <directory> | --only-filename] [-A] [-a] [-n]
[-K <fields>] [-L]
Expand Down Expand Up @@ -346,7 +346,7 @@ CLI Usage
--bail Stop execution when an exception occurs.
--catch-errors Print error messages instead stop execution in a batch run.
-k, --colorize Colorize the command line print statements.
-C GENERAL_CONFIG_FILE, --config-file GENERAL_CONFIG_FILE
-C <file-path>, --config-file <file-path>
Specify a configuration file in the INI format.
-d, --dry-run Simulate the actions.
-m, --mscore, --save-in-mscore
Expand Down Expand Up @@ -451,7 +451,7 @@ CLI Usage
-y, --synchronize Synchronize the values of the first vertical frame (vbox)
(title, subtitle, composer, lyricist) with the corresponding
metadata fields
-S DESTINATION_FIELD FORMAT_STRING, --set-field DESTINATION_FIELD FORMAT_STRING
-S <field> <format-string>, --set-field <field> <format-string>
Set value to meta data fields.
--metatag <field> <value>, --metatag-meta <field> <value>
Define the metadata in MetaTag elements. Available fields:
Expand All @@ -476,11 +476,11 @@ CLI Usage
field (metatag).

lyrics:
-x LYRICS_EXTRACT, --extract LYRICS_EXTRACT, --extract-lyrics LYRICS_EXTRACT
-x <number-or-all>, --extract <number-or-all>, --extract-lyrics <number-or-all>
Extract each lyrics verse into a separate MuseScore file.
Specify ”all” to extract all lyrics verses. The old verse
number is appended to the file name, e. g.: score_1.mscx.
-r LYRICS_REMAP, --remap LYRICS_REMAP, --remap-lyrics LYRICS_REMAP
-r <remap-pairs>, --remap <remap-pairs>, --remap-lyrics <remap-pairs>
Remap lyrics. Example: "--remap 3:2,5:3". This example
remaps lyrics verse 3 to verse 2 and verse 5 to 3. Use
commas to specify multiple remap pairs. One remap pair is
Expand All @@ -492,7 +492,7 @@ CLI Usage
correct hyphenation ("la - la - la")

rename:
Rename the “*.msc[zx]” files.Fields and functions you can use in the format string (-f, --format):
Rename the “*.msc[zx]” files. Fields and functions you can use in the path template string (-r, --rename):
Functions
=========
Expand Down
18 changes: 9 additions & 9 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ Comande line interface
::

usage: musescore-manager [-h] [--print-completion {bash,zsh,tcsh}] [-V] [-b]
[--bail] [--catch-errors] [-k] [-C GENERAL_CONFIG_FILE]
[-d] [-m] [--diff] [-e FILE_PATH] [-v] [-E <extension>]
[--bail] [--catch-errors] [-k] [-C <file-path>] [-d]
[-m] [--diff] [-e FILE_PATH] [-v] [-E <extension>]
[--compress] [-c META_CLEAN] [-D]
[-i <source-fields> <format-string>] [-j]
[-l <log-file> <format-string>] [-y]
[-S DESTINATION_FIELD FORMAT_STRING]
[-S <field> <format-string>]
[--metatag <field> <value>] [--vbox <field> <value>]
[--title <string>] [--subtitle <string>]
[--composer <string>] [--lyricist <string>]
[-x LYRICS_EXTRACT] [-r LYRICS_REMAP] [-F]
[-x <number-or-all>] [-r <remap-pairs>] [-F]
[--rename <path-template>]
[-t <directory> | --only-filename] [-A] [-a] [-n]
[-K <fields>] [-L]
Expand Down Expand Up @@ -45,7 +45,7 @@ Comande line interface
--bail Stop execution when an exception occurs.
--catch-errors Print error messages instead stop execution in a batch run.
-k, --colorize Colorize the command line print statements.
-C GENERAL_CONFIG_FILE, --config-file GENERAL_CONFIG_FILE
-C <file-path>, --config-file <file-path>
Specify a configuration file in the INI format.
-d, --dry-run Simulate the actions.
-m, --mscore, --save-in-mscore
Expand Down Expand Up @@ -150,7 +150,7 @@ Comande line interface
-y, --synchronize Synchronize the values of the first vertical frame (vbox)
(title, subtitle, composer, lyricist) with the corresponding
metadata fields
-S DESTINATION_FIELD FORMAT_STRING, --set-field DESTINATION_FIELD FORMAT_STRING
-S <field> <format-string>, --set-field <field> <format-string>
Set value to meta data fields.
--metatag <field> <value>, --metatag-meta <field> <value>
Define the metadata in MetaTag elements. Available fields:
Expand All @@ -175,11 +175,11 @@ Comande line interface
field (metatag).

lyrics:
-x LYRICS_EXTRACT, --extract LYRICS_EXTRACT, --extract-lyrics LYRICS_EXTRACT
-x <number-or-all>, --extract <number-or-all>, --extract-lyrics <number-or-all>
Extract each lyrics verse into a separate MuseScore file.
Specify ”all” to extract all lyrics verses. The old verse
number is appended to the file name, e. g.: score_1.mscx.
-r LYRICS_REMAP, --remap LYRICS_REMAP, --remap-lyrics LYRICS_REMAP
-r <remap-pairs>, --remap <remap-pairs>, --remap-lyrics <remap-pairs>
Remap lyrics. Example: "--remap 3:2,5:3". This example
remaps lyrics verse 3 to verse 2 and verse 5 to 3. Use
commas to specify multiple remap pairs. One remap pair is
Expand All @@ -191,7 +191,7 @@ Comande line interface
correct hyphenation ("la - la - la")

rename:
Rename the “*.msc[zx]” files.Fields and functions you can use in the format string (-f, --format):
Rename the “*.msc[zx]” files. Fields and functions you can use in the path template string (-r, --rename):
Functions
=========
Expand Down
11 changes: 7 additions & 4 deletions mscxyz/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]:
parser.add_argument(
"-C",
"--config-file",
metavar="<file-path>",
dest="general_config_file",
help="Specify a configuration file in the INI format.",
)
Expand Down Expand Up @@ -313,7 +314,7 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]:
"--set-field",
nargs=2,
action="append",
metavar=("DESTINATION_FIELD", "FORMAT_STRING"),
metavar=("<field>", "<format-string>"),
dest="meta_set",
help="Set value to meta data fields.",
)
Expand Down Expand Up @@ -382,6 +383,7 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]:
"--extract",
"--extract-lyrics",
dest="lyrics_extract",
metavar="<number-or-all>",
help="Extract each lyrics verse into a separate MuseScore file. "
"Specify ”all” to extract all lyrics "
"verses. The old verse number is appended to the file name, e. g.: "
Expand All @@ -393,6 +395,7 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]:
"--remap",
"--remap-lyrics",
dest="lyrics_remap",
metavar="<remap-pairs>",
help='Remap lyrics. Example: "--remap 3:2,5:3". This '
"example remaps lyrics verse 3 to verse 2 and verse 5 to 3. "
"Use commas to specify multiple remap pairs. One remap pair "
Expand All @@ -417,9 +420,9 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]:

group_rename = parser.add_argument_group(
"rename",
"Rename the “*.msc[zx]” files."
"Fields and functions you can use in the format "
"string (-f, --format):\n\n"
"Rename the “*.msc[zx]” files. "
"Fields and functions you can use in the path "
"template string (-r, --rename):\n\n"
"Functions\n=========\n\n{}".format(tmep.get_doc()),
)

Expand Down

0 comments on commit 7a689c3

Please sign in to comment.