-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfile.py
More file actions
19 lines (17 loc) · 771 Bytes
/
file.py
File metadata and controls
19 lines (17 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import argparse
from .extract import *
def main():
# Initializing Parser
parser = argparse.ArgumentParser(description ='file based')
# Adding Argument
parser.add_argument("-l", "--fileWithLocation", type= str, nargs = 1,
metavar = "location", default = '', help = "file location")
parser.add_argument("-p", "--punctuation", type= str, nargs = 1,
metavar = "punctuation", default = 'n', help = "punctuation")
args = parser.parse_args()
if (args.punctuation[0].upper() == 'Y') or (args.punctuation[0].upper() == 'YES'):
var = punctuation(args.fileWithLocation[0])
else:
var = fileReader(args.fileWithLocation[0])
if __name__ == "__main__":
main()