-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
36 lines (29 loc) · 1.15 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import argparse
from bank_parser.bank_of_america import parse_bank_of_america
from bank_parser.capital_one_bank import parse_capital_one_bank
from bank_parser.CITIBANK import parse_CITIBANK
from bank_parser.Redacted_Bank import parse_redacted_bank
from bank_parser.PNC_Bank import parse_pnc_bank
def main():
# Set up the argument parser
parser = argparse.ArgumentParser(description='Process bank statements.')
# Add an argument for the bank name
parser.add_argument('bank', nargs='?', type=str, help='Name of the bank to process')
# Parse the command-line arguments
args = parser.parse_args()
# Now, you can access the bank name using args.bank
bank = args.bank
if bank == "Bank of America" or bank is None:
parse_bank_of_america()
if bank == "Capital One Bank" or bank is None:
parse_capital_one_bank()
if bank == "CITIBANK" or bank is None:
parse_CITIBANK()
if bank == "Redacted_Bank" or bank is None:
parse_redacted_bank()
if bank == "PNC_Bank" or bank is None:
parse_pnc_bank()
if bank == "PNC Bank" or bank is None:
pass
if __name__ == "__main__":
main()