-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_visa_status.py
87 lines (70 loc) · 1.73 KB
/
get_visa_status.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
from visa import Visa_Status
import pandas as pd
import argparse
pd.set_option("display.max_rows", None)
# Command line arguments
# ----------------------------------
parser = argparse.ArgumentParser()
parser.add_argument(
"resident_country", type=str, help="Current Resident Country",
)
parser.add_argument(
"-s",
"--selected",
help="Visa status for selected Countries in config.yaml ",
dest="visa_sel",
action="store_true",
)
parser.add_argument(
"-f",
"--visa-free",
help="Countries not requiring visa",
dest="visa_free",
action="store_true",
)
parser.add_argument(
"-r",
"--visa-required",
help="Countries requiring Visa",
dest="visa_required",
action="store_true",
)
parser.add_argument(
"-o",
"--visa-on-arrival",
help="Countries offering Visa on arrival",
dest="visa_voa",
action="store_true",
)
parser.add_argument(
"-e",
"--eta",
help="Countries offering Electronic Travel Authority",
dest="visa_eta",
action="store_true",
)
parser.add_argument(
"-n",
"--visa-free-days",
help="Countries offering visa free days",
dest="visa_free_days",
action="store_true",
)
args = parser.parse_args()
current_residency = Visa_Status(
"passport-index-dataset/passport-index-matrix.csv",
"config.yaml",
args.resident_country,
)
if args.visa_sel:
print(current_residency.get_status_sel())
if args.visa_free:
print(current_residency.get_status_vf())
if args.visa_required:
print(current_residency.get_status_vr())
if args.visa_voa:
print(current_residency.get_status_voa())
if args.visa_eta:
print(current_residency.get_status_eta())
if args.visa_free_days:
print(current_residency.get_status_vfe())