-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import argparse | |
from gui import * | ||
|
||
# INFO------------------------- | ||
version = "0.4" | ||
version = "0.5" | ||
app_name = "SmartLog" | ||
source_info = "https://github.com/zendorx/smart-logcat" | ||
contacts_info = "[email protected]" | ||
|
@@ -41,6 +41,7 @@ parser.add_argument("--command_clean", default="adb logcat -c", help="specifies | |
parser.add_argument("--pid_lookup", default="", help="specifies string for looking process id.") | ||
parser.add_argument("--pid_mask", default="\((.*?)\)", help="specifies regex to searching pid in a text line.") | ||
|
||
parser.add_argument("--file", default="", help="specifies log file to read.") | ||
# parser.add_argument("-ec", default=exit_commands, | ||
# help="commands that will executed on exit splited by ';' e.g: 'w;q' will write file and open explorer. To see more commands type :h") | ||
# | ||
|
@@ -114,13 +115,18 @@ if _args.pid_lookup: | |
gui.set_pid_lookup(_args.pid_lookup) | ||
|
||
app.set_command_exec(_args.command_execute) | ||
app.start_reading() | ||
|
||
if _args.file: | ||
app.read_from_file(_args.file) | ||
else: | ||
app.start_reading() | ||
|
||
while not gui.is_finished(): | ||
app.update() | ||
gui.update() | ||
|
||
app.stop_reading() | ||
if not _args.file: | ||
app.stop_reading() | ||
|
||
if _args.exit_clean: | ||
app.clear(_args.command_clean) | ||
|
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