def glyphs2ufo(options):
if options.output_dir is None:<EOL><INDENT>options.output_dir = os.path.dirname(options.glyphs_file) or "<STR_LIT:.>"<EOL><DEDENT>if options.designspace_path is None:<EOL><INDENT>options.designspace_path = os.path.join(<EOL>options.output_dir,<EOL>os.path.basename(os.path.splitext(options.glyphs_file)[<NUM_LIT:0>]) + "<STR_LIT>",<EOL>)<EOL><DEDENT>glyphsLib.build_masters(<EOL>options.glyphs_file,<EOL>options.output_dir,<EOL>options.instance_dir,<EOL>designspace_path=options.designspace_path,<EOL>minimize_glyphs_diffs=options.no_preserve_glyphsapp_metadata,<EOL>propagate_anchors=options.propagate_anchors,<EOL>normalize_ufos=options.normalize_ufos,<EOL>create_background_layers=options.create_background_layers,<EOL>generate_GDEF=options.generate_GDEF,<EOL>store_editor_state=not options.no_store_editor_state,<EOL>)<EOL>
Converts a Glyphs.app source file into UFO masters and a designspace file.