Skip to content

Commit 0d1b91b

Browse files
author
George Ciesinski
committed
Merge branch 'release/1.0.0'
2 parents 4a6aabf + 7e46383 commit 0d1b91b

File tree

5 files changed

+42
-9
lines changed

5 files changed

+42
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ __pycache__/
33
Logs/*
44
!Logs/.logfolder.txt
55
venv/
6+
build/*
7+
dist/*
8+
app.spec

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [1.0.0] - 2020-01-16
10+
### Added
11+
- Debugging print lines removed
12+
- App prints all of the shortcuts and directories during start
13+
- Better logging to track potential issues
14+
15+
## [0.0.1] - 2020-01-14
16+
### Added
17+
- Created first basic version
18+
- Functional textblock printing and shortcut recognition
19+
- Released as alpha for testing purposes

TextController.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ def keycode_to_keydata(self):
7979
self.keydata = str(self.key)
8080
self.keydata = self.keydata.strip("'")
8181

82-
# Prints typed letter to console
83-
print(self.keydata)
84-
8582
def check_delimiter(self):
8683
"""
8784
Checks if delimiter has been entered. Either starts self.current_word or restarts it.
@@ -187,7 +184,6 @@ def find_file_directory(self, index):
187184
# Searches self.file_dir_list by index for the directory
188185
textblock_directory = self.file_dir_list[index]
189186
self.log.debug(f"Successfully found the textblock directory: {textblock_directory}")
190-
print(textblock_directory)
191187

192188
# Reads the textblock file
193189
self.read_textblock(textblock_directory)

app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
# Creates shortcut list with the same index
2323
shortcut_list = glib.list_shortcuts(file_list)
2424

25+
glib.print_shortcuts(file_dir_list, shortcut_list)
26+
2527
# Initializes KeyboardEmulator instance
2628
k = KeyboardEmulator(L)
2729

glib.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def list_subdirectories(directory):
1111
Lists all subdirectories.
1212
1313
:param directory:
14-
:return:
14+
:return directory_list:
15+
:rtype list:
1516
"""
1617

1718
directory_list = list()
@@ -20,15 +21,15 @@ def list_subdirectories(directory):
2021
for name in dirs:
2122
directory_list.append(os.path.join(root, name))
2223

23-
print(directory_list)
24+
return directory_list
2425

2526

2627
def list_files(directory):
2728
"""
2829
Lists all files and subdirectories in the directory. Returns list
2930
3031
:param directory:
31-
:return file_list:
32+
:return file_list, file_dir_list:
3233
:rtype list:
3334
"""
3435

@@ -40,12 +41,17 @@ def list_files(directory):
4041
file_list.append(name)
4142
file_dir_list.append(os.path.join(root, name))
4243

43-
print(file_dir_list)
44-
4544
return file_list, file_dir_list
4645

4746

4847
def list_shortcuts(file_list):
48+
"""
49+
list_shortcuts creates a list of the raw shortcut strings the user would be typing in
50+
51+
:param file_list:
52+
:return shortcut_list:
53+
:rtype list:
54+
"""
4955

5056
shortcut_list = list()
5157

@@ -56,6 +62,13 @@ def list_shortcuts(file_list):
5662
return shortcut_list
5763

5864

65+
def print_shortcuts(file_dir_list, shortcut_list):
66+
67+
for file_dir in file_dir_list:
68+
index = file_dir_list.index(file_dir)
69+
print(f"Shortcut: {shortcut_list[index]} - - - Directory: {file_dir}")
70+
71+
5972
if __name__ == "__main__":
6073

6174
text_block_dir = 'Textblocks/'

0 commit comments

Comments
 (0)