diff --git a/README.rst b/README.rst index 591cb07..0b8c948 100644 --- a/README.rst +++ b/README.rst @@ -586,6 +586,20 @@ CLI Usage file. --s3, --styles-v3 List all possible version 3 styles. --s4, --styles-v4 List all possible version 4 styles. + --staff-space + Set the staff space or spatium. This is the vertical + distance between two lines of a music staff. + --page-size + Set the page size. + --a4, --din-a4 Set the paper size to DIN A4 (210 by 297 mm). + --letter Set the paper size to Letter (8.5 by 11 in). + --margin Set the top, right, bottom and left margins to the same + value. + --reset-small-staffs Reset all small staffs to normal size. + + font (style): + Change the font faces of a score. + --list-fonts List all font related styles. --text-font Set nearly all fonts except “romanNumeralFontFace”, @@ -598,15 +612,10 @@ CLI Usage “dynamicsFontFace”. --musical-text-font Set “musicalTextFont”. - --staff-space - Set the staff space or spatium. This is the vertical - distance between two lines of a music staff. - --page-size - Set the page size. - --a4, --din-a4 Set the paper size to DIN A4 (210 by 297 mm). - --letter Set the paper size to Letter (8.5 by 11 in). - --margin Set the top, right, bottom and left margins to the same - value. + + header (style): + Change the header. + --show-header, --no-show-header Show or hide the header. --header-first-page, --no-header-first-page @@ -617,6 +626,10 @@ CLI Usage Set the header for all pages. --header-odd-even Set different headers for odd and even pages. + + footer (style): + Change the footer. + --show-footer, --no-show-footer Show or hide the footer. --footer-first-page, --no-footer-first-page @@ -627,7 +640,6 @@ CLI Usage Set the footer for all pages. --footer-odd-even Set different footers for odd and even pages. - --reset-small-staffs Reset all small staffs to normal size. Configuration file ================== diff --git a/docs/cli.rst b/docs/cli.rst index 33247c0..43757b3 100644 --- a/docs/cli.rst +++ b/docs/cli.rst @@ -194,6 +194,20 @@ Comande line interface file. --s3, --styles-v3 List all possible version 3 styles. --s4, --styles-v4 List all possible version 4 styles. + --staff-space + Set the staff space or spatium. This is the vertical + distance between two lines of a music staff. + --page-size + Set the page size. + --a4, --din-a4 Set the paper size to DIN A4 (210 by 297 mm). + --letter Set the paper size to Letter (8.5 by 11 in). + --margin Set the top, right, bottom and left margins to the same + value. + --reset-small-staffs Reset all small staffs to normal size. + + font (style): + Change the font faces of a score. + --list-fonts List all font related styles. --text-font Set nearly all fonts except “romanNumeralFontFace”, @@ -206,15 +220,10 @@ Comande line interface “dynamicsFontFace”. --musical-text-font Set “musicalTextFont”. - --staff-space - Set the staff space or spatium. This is the vertical - distance between two lines of a music staff. - --page-size - Set the page size. - --a4, --din-a4 Set the paper size to DIN A4 (210 by 297 mm). - --letter Set the paper size to Letter (8.5 by 11 in). - --margin Set the top, right, bottom and left margins to the same - value. + + header (style): + Change the header. + --show-header, --no-show-header Show or hide the header. --header-first-page, --no-header-first-page @@ -225,6 +234,10 @@ Comande line interface Set the header for all pages. --header-odd-even Set different headers for odd and even pages. + + footer (style): + Change the footer. + --show-footer, --no-show-footer Show or hide the footer. --footer-first-page, --no-footer-first-page @@ -235,5 +248,4 @@ Comande line interface Set the footer for all pages. --footer-odd-even Set different footers for odd and even pages. - --reset-small-staffs Reset all small staffs to normal size. diff --git a/mscxyz/cli.py b/mscxyz/cli.py index d8b2489..caaacdc 100644 --- a/mscxyz/cli.py +++ b/mscxyz/cli.py @@ -531,14 +531,18 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]: help="List all possible version 4 styles.", ) -style_group.add_argument( +font_group = parser.add_argument_group( + "font (style)", "Change the font faces of a score." +) + +font_group.add_argument( "--list-fonts", dest="style_list_fonts", action="store_true", help="List all font related styles.", ) -style_group.add_argument( +font_group.add_argument( "--text-font", dest="style_text_font", metavar="", @@ -546,14 +550,14 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]: "“dynamicsFontFace“, “musicalSymbolFont” and “musicalTextFont”.", ) -style_group.add_argument( +font_group.add_argument( "--title-font", dest="style_title_font", metavar="", help="Set “titleFontFace” and “subTitleFontFace”.", ) -style_group.add_argument( +font_group.add_argument( "--musical-symbol-font", dest="style_musical_symbol_font", choices=musical_symbol_font_faces, @@ -561,7 +565,7 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]: help="Set “musicalSymbolFont”, “dynamicsFont” and “dynamicsFontFace”.", ) -style_group.add_argument( +font_group.add_argument( "--musical-text-font", dest="style_musical_text_font", choices=musical_text_font_faces, @@ -610,28 +614,30 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]: # header -style_group.add_argument( +header_group = parser.add_argument_group("header (style)", "Change the header.") + +header_group.add_argument( "--show-header", dest="style_show_header", action=argparse.BooleanOptionalAction, help="Show or hide the header.", ) -style_group.add_argument( +header_group.add_argument( "--header-first-page", dest="style_header_first_page", action=argparse.BooleanOptionalAction, help="Show the header on the first page.", ) -style_group.add_argument( +header_group.add_argument( "--different-odd-even-header", dest="style_different_odd_even_header", action=argparse.BooleanOptionalAction, help="Use different header for odd and even pages.", ) -style_group.add_argument( +header_group.add_argument( "--header", nargs=3, dest="style_header_all", @@ -639,7 +645,7 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]: help="Set the header for all pages.", ) -style_group.add_argument( +header_group.add_argument( "--header-odd-even", nargs=6, dest="style_header_odd_even", @@ -656,28 +662,30 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]: # footer -style_group.add_argument( +footer_group = parser.add_argument_group("footer (style)", "Change the footer.") + +footer_group.add_argument( "--show-footer", dest="style_show_footer", action=argparse.BooleanOptionalAction, help="Show or hide the footer.", ) -style_group.add_argument( +footer_group.add_argument( "--footer-first-page", dest="style_footer_first_page", action=argparse.BooleanOptionalAction, help="Show the footer on the first page.", ) -style_group.add_argument( +footer_group.add_argument( "--different-odd-even-footer", dest="style_different_odd_even_footer", action=argparse.BooleanOptionalAction, help="Use different footers for odd and even pages.", ) -style_group.add_argument( +footer_group.add_argument( "--footer", nargs=3, dest="style_footer_all", @@ -685,7 +693,7 @@ def _split_lines(self, text: typing.Text, width: int) -> typing.List[str]: help="Set the footer for all pages.", ) -style_group.add_argument( +footer_group.add_argument( "--footer-odd-even", nargs=6, dest="style_footer_odd_even",