forked from GeorgeCiesinski/text-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
31 lines (20 loc) · 715 Bytes
/
app.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
import glib
from Logger import Logger
from TextController import WordCatcher, KeyboardEmulator
if __name__ == "__main__":
# Initialize Logger
L = Logger()
L.log.debug("Program started from App.py.")
"""
Initialize Text Controller
"""
# Gets file_list and file_dir_list
textblock_dir = "Textblocks/"
file_list, file_dir_list = glib.list_files(textblock_dir)
# Creates shortcut list with the same index
shortcut_list = glib.list_shortcuts(file_list)
glib.print_shortcuts(file_dir_list, shortcut_list)
# Initializes KeyboardEmulator instance
k = KeyboardEmulator(L)
# Initialize WordCatcher
w = WordCatcher(L, k, shortcut_list, file_dir_list)