Skip to content

Commit ca4b8c0

Browse files
authored
Merge pull request #15 from PovertyAction/ux-improvements
Added menu options
2 parents fa13250 + 6fb1f54 commit ca4b8c0

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tkinter_script.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from multiprocessing import Process, Pipe
1111
import PII_data_processor
1212
from PIL import ImageTk, Image
13+
import webbrowser
1314

1415
intro_text = "This script is meant to assist in the detection of PII (personally identifiable information) and subsequent removal from a dataset."
1516
intro_text_p2 = "Ensuring the dataset is devoid of PII is ultimately still your responsibility. Be careful with potential identifiers, especially geographic, because they can sometimes be combined with other variables to become identifying."
@@ -126,13 +127,20 @@ def file_select():
126127
root.after(2000, next_steps(identified_pii, dataset, datap_functions_conn, datap_messages_conn, tkinter_functions_conn, tkinter_messages_conn))
127128

128129
def about():
129-
import webbrowser
130130
webbrowser.open('https://github.com/PovertyAction/PII_detection/blob/master/README.md#pii_detection')
131131

132132
def contact():
133-
import webbrowser
134133
webbrowser.open('https://github.com/PovertyAction/PII_detection/issues')
135134

135+
def methods():
136+
webbrowser.open('https://github.com/PovertyAction/PII_detection/blob/master/README.md#pii_detection')
137+
138+
def comparison():
139+
webbrowser.open('https://github.com/PovertyAction/PII_detection/blob/master/README.md#pii_detection')
140+
141+
def PII_field_names():
142+
webbrowser.open('https://github.com/PovertyAction/PII_detection/blob/fa1325094ecdd085864a58374d9f687181ac09fd/PII_data_processor.py#L115')
143+
136144
def next_steps(identified_pii, dataset, datap_functions_conn, datap_messages_conn, tkinter_functions_conn, tkinter_messages_conn):
137145
### Date Detection ###
138146
tkinter_display('in next steps')
@@ -187,7 +195,14 @@ def restart_program():
187195
# create more pulldown menus
188196
helpmenu = Menu(menubar, tearoff=0)
189197
helpmenu.add_command(label="About", command=about)
198+
helpmenu.add_command(label="- Detection Methods", command=methods)
199+
helpmenu.add_command(label="- Comparison with Other Scripts", command=comparison)
200+
helpmenu.add_command(label="- PII Field Names", command=PII_field_names)
201+
helpmenu.add_command(label="- Data Security", command=PII_field_names)
202+
helpmenu.add_separator()
190203
helpmenu.add_command(label="File Issue on GitHub", command=contact)
204+
helpmenu.add_separator()
205+
helpmenu.add_command(label="Contribute", command=contact)
191206
menubar.add_cascade(label="Help", menu=helpmenu)
192207

193208
root.configure(background='light gray', menu=menubar)

0 commit comments

Comments
 (0)