From d502f285420659861854b3e3b9139dfd7f4a2b27 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Thu, 2 Nov 2023 13:51:53 +0000 Subject: [PATCH] add --no-escape-newlines to the CLI entry point as well --- src/openstep_plist/__main__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/openstep_plist/__main__.py b/src/openstep_plist/__main__.py index 673128b..9165225 100755 --- a/src/openstep_plist/__main__.py +++ b/src/openstep_plist/__main__.py @@ -37,6 +37,9 @@ def main(args=None): "-j", "--json", help="use json to serialize", action="store_true", default=False ) parser.add_argument("-i", "--indent", help="indentation level", type=int, default=2) + parser.add_argument( + "--no-escape-newlines", dest="escape_newlines", action="store_false" + ) args = parser.parse_args(args) if not args.glyphs: @@ -58,7 +61,11 @@ def parse(fp, dict_type=dict): if args.glyphs: from glyphsLib.writer import dump else: - dump = partial(openstep_plist.dump, indent=args.indent) + dump = partial( + openstep_plist.dump, + indent=args.indent, + escape_newlines=args.escape_newlines, + ) with open(args.infile, "r", encoding="utf-8") as fp: data = parse(fp)