26 lines
431 B
Python
26 lines
431 B
Python
"""
|
|
Functions for using this module from CLI
|
|
"""
|
|
|
|
import sys
|
|
|
|
from .utils import process
|
|
|
|
def main(source: str, sink: str) -> int:
|
|
"""
|
|
Main method
|
|
"""
|
|
|
|
with open(source, 'r') as fil:
|
|
code_py = fil.read()
|
|
|
|
code_wat = process(code_py, source)
|
|
|
|
with open(sink, 'w') as fil:
|
|
fil.write(code_wat)
|
|
|
|
return 0
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main(*sys.argv[1:])) # pylint: disable=E1120
|