MCPcopy Index your code
hub / github.com/nodejs/node / Main

Function Main

tools/zos/sdwrap.py:54–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 return 0
53
54def Main():
55 parser = argparse.ArgumentParser(description="Wrap sidedeck source to card formats")
56 parser.add_argument("-u", "--unwrap",
57 help="Unwrap sidedeck cards to source formats instead", action="store_true",
58 default=False)
59 parser.add_argument("-i", "--input", help="input filename, default to stdin",
60 action="store", default=None)
61 parser.add_argument("-o", "--output", help="output filename, default to stdout",
62 action="store", default=None)
63
64 args = parser.parse_args()
65
66 if args.input is None:
67 args.input = sys.stdin
68 else:
69 args.input = open(args.input, 'r')
70
71 if args.output is None:
72 args.output = sys.stdout
73 else:
74 args.output = open(args.output, 'w')
75
76 if args.unwrap:
77 return unwrap(args)
78
79 return wrap(args)
80
81if __name__ == '__main__':
82 sys.exit(Main())

Callers 1

sdwrap.pyFile · 0.70

Calls 5

unwrapFunction · 0.85
wrapFunction · 0.70
openFunction · 0.50
add_argumentMethod · 0.45
parse_argsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…