-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from JE-Chen/dev
Dev
- Loading branch information
Showing
12 changed files
with
79 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from os import walk | ||
from os import getcwd | ||
from os.path import abspath | ||
from os.path import join | ||
|
||
|
||
def get_dir_files_as_list(dir_path: str = getcwd(), default_search_file_extension: str = ".json"): | ||
""" | ||
:param dir_path: which dir we want to walk and get file list | ||
:param default_search_file_extension: which extension we want to search | ||
:return: [] if nothing searched or [file1, file2.... files] file was searched | ||
""" | ||
return [ | ||
abspath(join(dir_path, file)) for root, dirs, files in walk(dir_path) | ||
for file in files | ||
if file.endswith(default_search_file_extension.lower()) | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
test/integrated_test/get_dir_file_and_execute/get_dir_file_and_execute.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import os | ||
|
||
from je_auto_control import get_dir_files_as_list | ||
from je_auto_control import execute_files | ||
files_list = get_dir_files_as_list(os.getcwd() + "/test/integrated_test/get_dir_file_and_execute") | ||
print(files_list) | ||
if files_list is not None: | ||
execute_files(files_list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[["type_key", {"keycode": 0}], ["mouse_left", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}], ["position"], ["press_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}], ["release_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[["type_key", {"keycode": 0}], ["mouse_left", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}], ["position"], ["press_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}], ["release_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[["type_key", {"keycode": 0}], ["mouse_left", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}], ["position"], ["press_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}], ["release_mouse", {"mouse_keycode": "mouse_left", "x": 500, "y": 500}]] |