Skip to content

Commit

Permalink
Remove metavar to show choices
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-Friedrich committed Feb 11, 2024
1 parent 2b34d38 commit 2e7cc9e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ CLI Usage
[-s <style-name> <value>] [--clean] [-Y <file>] [--s3]
[--s4] [--reset-small-staffs] [--list-fonts]
[--text-font <font-face>] [--title-font <font-face>]
[--musical-symbol-font <font-face>]
[--musical-text-font <font-face>]
[--musical-symbol-font {Leland,Bravura,Emmentaler,Gonville,MuseJazz,Petaluma,Finale Maestro,Finale Broadway}]
[--musical-text-font {Leland Text,Bravura Text,Emmentaler Text,Gonville Text,MuseJazz Text,Petaluma Text,Finale Maestro Text,Finale Broadway Text}]
[--staff-space <dimension>]
[--page-size <width> <height>] [--a4] [--letter]
[--margin <dimension>]
Expand Down Expand Up @@ -833,10 +833,10 @@ CLI Usage
“musicalSymbolFont” and “musicalTextFont”.
--title-font <font-face>
Set “titleFontFace” and “subTitleFontFace”.
--musical-symbol-font <font-face>
--musical-symbol-font {Leland,Bravura,Emmentaler,Gonville,MuseJazz,Petaluma,Finale Maestro,Finale Broadway}
Set “musicalSymbolFont”, “dynamicsFont” and
“dynamicsFontFace”.
--musical-text-font <font-face>
--musical-text-font {Leland Text,Bravura Text,Emmentaler Text,Gonville Text,MuseJazz Text,Petaluma Text,Finale Maestro Text,Finale Broadway Text}
Set “musicalTextFont”.

page (style):
Expand Down
8 changes: 4 additions & 4 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Comande line interface
[-s <style-name> <value>] [--clean] [-Y <file>] [--s3]
[--s4] [--reset-small-staffs] [--list-fonts]
[--text-font <font-face>] [--title-font <font-face>]
[--musical-symbol-font <font-face>]
[--musical-text-font <font-face>]
[--musical-symbol-font {Leland,Bravura,Emmentaler,Gonville,MuseJazz,Petaluma,Finale Maestro,Finale Broadway}]
[--musical-text-font {Leland Text,Bravura Text,Emmentaler Text,Gonville Text,MuseJazz Text,Petaluma Text,Finale Maestro Text,Finale Broadway Text}]
[--staff-space <dimension>]
[--page-size <width> <height>] [--a4] [--letter]
[--margin <dimension>]
Expand Down Expand Up @@ -210,10 +210,10 @@ Comande line interface
“musicalSymbolFont” and “musicalTextFont”.
--title-font <font-face>
Set “titleFontFace” and “subTitleFontFace”.
--musical-symbol-font <font-face>
--musical-symbol-font {Leland,Bravura,Emmentaler,Gonville,MuseJazz,Petaluma,Finale Maestro,Finale Broadway}
Set “musicalSymbolFont”, “dynamicsFont” and
“dynamicsFontFace”.
--musical-text-font <font-face>
--musical-text-font {Leland Text,Bravura Text,Emmentaler Text,Gonville Text,MuseJazz Text,Petaluma Text,Finale Maestro Text,Finale Broadway Text}
Set “musicalTextFont”.

page (style):
Expand Down
2 changes: 0 additions & 2 deletions mscxyz/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,15 +583,13 @@ def setup_parser() -> argparse.ArgumentParser:
"--musical-symbol-font",
dest="style_musical_symbol_font",
choices=musical_symbol_font_faces,
metavar="<font-face>",
help="Set “musicalSymbolFont”, “dynamicsFont” and “dynamicsFontFace”.",
)

font.add_argument(
"--musical-text-font",
dest="style_musical_text_font",
choices=musical_text_font_faces,
metavar="<font-face>",
help="Set “musicalTextFont”.",
)

Expand Down
11 changes: 8 additions & 3 deletions mscxyz/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def inch(value: str | float) -> float:
return Dimension(value).to("in")


# https://github.com/musescore/MuseScore/blob/940f5ce4c83c9168e3be0e1509664a7abffcf9e8/src/engraving/engravingmodule.cpp#L120-L127
musical_symbol_font_faces = (
"Leland",
"Bravura",
Expand All @@ -43,7 +42,11 @@ def inch(value: str | float) -> float:
"Finale Maestro",
"Finale Broadway",
)
"""
Musical symbol font faces
:see: `MuseScore C++ source code: engravingmodule.cpp lines 120-127 <https://github.com/musescore/MuseScore/blob/940f5ce4c83c9168e3be0e1509664a7abffcf9e8/src/engraving/engravingmodule.cpp#L120-L127>`_
"""

musical_text_font_faces = (
"Leland Text",
Expand All @@ -57,9 +60,11 @@ def inch(value: str | float) -> float:
"Finale Maestro Text",
"Finale Broadway Text",
)
"""
Musical text font faces

# https://github.com/musescore/MuseScore/blob/940f5ce4c83c9168e3be0e1509664a7abffcf9e8/src/notation/view/widgets/editstyle.cpp#L1966-L1973
:see: `MuseScore C++ source code: editstyle.cpp lines 1966-1973 <https://github.com/musescore/MuseScore/blob/940f5ce4c83c9168e3be0e1509664a7abffcf9e8/src/notation/view/widgets/editstyle.cpp#L1966-L1973>`_
"""


text_font_faces = (
Expand Down

0 comments on commit 2e7cc9e

Please sign in to comment.