Skip to content

Commit

Permalink
add --no-escape-newlines to the CLI entry point as well
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Nov 2, 2023
1 parent e740a38 commit d502f28
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/openstep_plist/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit d502f28

Please sign in to comment.