a2017fa415
Added check_disk.py
2019-10-02 21:40:56 -07:00
ad06fab8a2
Updated log path options
...
* Adjusted default log path
* Support Windows Kit/Tool/General log paths
2019-10-02 21:34:07 -07:00
1ffabd8642
Updated wk.os.win
2019-09-23 00:01:54 -07:00
4c35d7cb4e
Added CHKDSK functions
2019-09-22 23:34:02 -07:00
ff1044a401
Fixed logic error in non_clobber_path()
...
* Before the '_1000' path would be returned incorrectly
* If a non-existant path wasn't found that is
2019-09-22 23:31:15 -07:00
60969f26eb
Reworked setting log paths
...
* Added DEFAULT_LOG_DIR and DEFAULT_LOG_NAME vars
* Allows easier reuse of default values
* Added format_log_path()
* Uses default path/name unless dir/name specified
* Added get_root_logger_path()
* Returns the first fileHandler path found (if any)
* update_log_path() now supports multiple handler scenarios
2019-09-22 23:27:41 -07:00
2ea0b4818a
Updated run_sfc_scan()
...
* Output is UTF-16, decode it as such
* Simplifies section
* Reworked checking the result
* Use separate exceptions for corruption and general errors
2019-09-22 21:50:08 -07:00
972cb6fb66
Breaking updates to TryAndPrint()
...
* Removed print_return argument
* Instead if the function returns data assume it should be printed
* Added ability to override msg_good for a single run() call
2019-09-22 21:27:28 -07:00
1cfd8fb7b4
Added outer activation script
2019-09-22 20:06:40 -07:00
f27f3024e8
Added get_json_from_command()
2019-09-18 22:37:18 -07:00
115a462f6e
Added Windows activation functions
2019-09-18 22:27:38 -07:00
0636a032be
Added threading functions
2019-09-18 21:51:39 -07:00
27d348bf9c
Expanded debug log
2019-09-18 21:36:39 -07:00
f1775766e7
Updated wk.log.update_log_path()
...
* The log file is now moved instead of copied
* The new path can now be based on a new dir, name, or both
2019-09-18 20:58:06 -07:00
318f59c473
Added logging to print functions
2019-09-18 20:23:13 -07:00
5925aca3c2
Allow strings to be passed to print_colored()
2019-09-18 20:02:39 -07:00
f55f0ba016
Adjusted logging in TryAndPrint()
2019-09-18 20:02:13 -07:00
304d811698
Moved exe functions to a separate file
2019-09-18 18:49:56 -07:00
2678ce77da
Added SFC scan
2019-09-15 19:34:06 -07:00
b41027562a
Added SafeMode enter/exit sections
2019-09-15 18:47:52 -07:00
78e3765730
Added delete_item()
2019-09-15 17:29:10 -07:00
010ac87de6
Added delete_empty_folders() and delete_folder()
2019-09-15 16:50:06 -07:00
7a99713043
Added non_clobbering_path()
2019-09-15 16:28:47 -07:00
6af5f78fbb
Dropping wk/exe.py
...
* All intended functionality now in std.py
2019-09-15 15:34:27 -07:00
8ca59a029a
Added popen_program()
2019-09-15 15:32:34 -07:00
40413151c8
Added run_program()
2019-09-15 15:10:13 -07:00
6f60006c9a
Added get, kill, and wait process functions
2019-09-15 14:35:32 -07:00
b71f1d8d80
Reordered functions
2019-09-15 13:33:59 -07:00
8c8eea0f9a
Adjusted pylint settings
2019-09-13 22:48:33 -07:00
7cb5ecd09f
Added TryAndPrint() class
...
* Replaces try_and_print() function
* Moved several functions to TryAndPrint() class
* _format_exception_message()
* _format_function_output()
* _get_exception()
* Separates the formatting settings and the function paramters
2019-09-13 22:35:39 -07:00
8d9e264efc
Fix menu checkmark under macOS
2019-09-13 21:02:56 -07:00
3d95d9c1a1
Fixed clear_screen() under Windows
2019-09-13 20:47:27 -07:00
4d6fad82db
Adjusted menu index formatting
...
* Right-align numbered and action text
2019-09-13 20:29:18 -07:00
94dac676fe
Updated formatting
2019-09-13 20:29:05 -07:00
a59f20ac8b
Support optional extra separators in Menu()
2019-09-13 19:44:56 -07:00
428bb5a05c
Updated advanced_select()
2019-09-13 18:45:07 -07:00
21b44d01ff
Added avanced_select() to Menu()
...
* Renamed 'Enabled' to 'Selected' for clarity
2019-09-13 18:41:47 -07:00
9da19f3702
Added support for hidden menu entries
2019-09-13 17:49:44 -07:00
f1a1a158ba
Added simple_select() to wk.std.Menu()
...
* Allows user to select one entry from available entries
2019-09-13 16:16:33 -07:00
68000272ea
Improved clear_screen()
...
* Now uses subprocess.run() instead of os.system()
* Avoids weird clear -> print issues
* i.e. Missing newlines, etc
2019-09-13 16:14:36 -07:00
e52e90454d
Fix seperator length
2019-09-07 15:44:38 -06:00
d7fc209e53
Added some doctests
2019-09-07 15:17:54 -06:00
849c53a62d
Include try_and_print result in log
2019-08-22 17:29:50 -06:00
2b08654d7c
Fixed _get_separator_length()
...
* Use title line(s) and 'Display Name' instead of name
* Menu()._update() is required to be run previously
2019-08-20 22:34:38 -06:00
1542ba39cd
Fixed _get_valid_answers()
...
* Correctly omits disabled items
2019-08-20 22:12:09 -06:00
34d5106804
Added _get_valid_answers() to Menu()
2019-08-20 22:05:20 -06:00
1f96ae5c53
Renamed _show() to _generate_menu_text()
...
* It returns a string instead of printing the text
2019-08-20 22:04:42 -06:00
bd3440daa9
Updated Menu()
...
* Added logic for disabled items
* Use 'Display Name' in _show()
2019-08-20 21:49:42 -06:00
8cedac738e
Added _get_display_name() and _update() to Menu()
...
* _update()
* Calls _get_display_name()
* Used to update the state of the menu
* Will add set logic to this method later
2019-08-20 21:18:47 -06:00
7a9c569251
Separating public and private methods
2019-08-20 21:15:59 -06:00
0707d650f6
Started work on the new Menu() object
...
* This will replace the old menu_select() function
* This will contain all toggle/set/selection logic
* Which would allow for simpler usage in other sections/scripts/etc
2019-08-20 20:32:37 -06:00
516dc88d44
Removed improper NotImplementedError usage
2019-08-20 19:21:44 -06:00
c43539a92d
Switching to f-strings where appropriate
2019-08-20 16:00:08 -06:00
b314a9f1e2
Bugfix updates for try_and_print()
2019-08-09 21:57:41 -06:00
4100c38280
Added generic exception classes
2019-08-09 20:34:05 -06:00
d722754f12
Replaced UserWarnings with proper exceptions
2019-08-09 20:10:13 -06:00
147b9d2035
Added format_exception_message()
2019-08-09 19:50:45 -06:00
4e5bef23da
Added format_function_output()
2019-08-09 19:06:06 -06:00
ff4e371b32
Added get_exception() and try_and_print()
...
* try_and_print needs the format_..() functions finished before it can be used
* Raised minimum Python version to 3.7
* Probably could go with 3.6 but meh
2019-08-09 19:00:01 -06:00
36e2ad8522
Updated cfg/main
...
* Added INDENT and WIDTH
2019-08-09 17:17:46 -06:00
11d9a5203e
Adjusted docstrings
2019-08-09 16:42:00 -06:00
cf5b546183
Compress report before uploading
...
* It's the new default but it can be disabled
2019-08-07 19:27:49 -06:00
2270236e42
major_exception() working
2019-08-07 19:25:02 -06:00
f75feca345
get_log_filepath() is working under all platforms
2019-08-06 21:52:11 -06:00
bde8d33f20
Include logging data in debug report if available
2019-08-06 21:51:43 -06:00
5d40d74c46
Include sys.argv in debug report
2019-08-06 21:10:13 -06:00
2f720210e9
Added generate_debug_report()
2019-08-06 20:56:03 -06:00
a0027122c9
Added set_title()
...
* Only Windows is supported ATM
2019-08-06 19:49:30 -06:00
a60e298f02
Updated bytes_to_string()
2019-08-06 19:29:40 -06:00
0757b9fe55
Added get_log_filepath()
...
* Much safer method than what was in upload_debug_report()
2019-07-25 22:03:15 -06:00
f1d53e698b
Added major_exception()
2019-07-25 21:34:22 -06:00
1829c3b2f3
Moved CRASH_SERVER to wk.cfg.main
2019-07-25 21:33:19 -06:00
1997cdcefd
Reordered log.py functions
2019-07-17 21:37:03 -06:00
4cb52a28a6
Removing useless print_standard()
...
* No longer needed with the separation of printing and logging
2019-07-17 21:35:27 -06:00
5c817717e7
Added upload_debug_report()
...
* Partial replacement for major_exception()
* Splitting that function into smaller parts
2019-07-17 21:34:14 -06:00
77238ad41a
Catch log.start() UserWarning
...
* May revert this down the road
2019-07-17 21:32:02 -06:00
c9d35a0e2f
Adjusted update_log_path()
...
* Should result in more uniform log names
2019-07-17 21:31:25 -06:00
6e963fe5da
Added wk/cfg/net.py
2019-07-17 21:30:20 -06:00
04ca9b9fff
Added bytes_to_string()
...
* Renamed from human_readable_size() for clarity
* Now supports KB vs KiB
* Now supports negative values
* Removed width logic as that should be handled elsewhere
* Removed auto conversion to bytes if passed a string
* An exception will now be raised if an invalid size is given
2019-07-17 19:22:02 -06:00
2cbe99952f
Updated string_to_binary()
...
* Raise an exception if the string can't be parsed as a valid size
* Handle strings without spaces (e.g. '1.44mb')
* Handle negative values
2019-07-17 18:38:56 -06:00
f985c03490
Added string_to_bytes()
...
* Renamed from convert_to_bytes() for clarity
* Now supports KB vs KiB
2019-07-17 18:28:05 -06:00
7a0a618b3f
Reordered functions in wk.std
2019-07-17 18:02:42 -06:00
1ffbd29ed5
Added choice()
2019-07-17 17:56:23 -06:00
b60f357527
Added abort()
2019-07-17 17:55:38 -06:00
6e43340acb
Adjusted debug logging
2019-07-17 17:55:20 -06:00
b0aa7b0218
Added beep()
2019-07-16 17:53:20 -06:00
86d9979a7f
Added sleep()
2019-07-16 17:53:14 -06:00
ac7fcb2e0b
Added clear_screen()
2019-07-16 17:52:21 -06:00
9da283f7fc
Adjusted print functions
...
* Logging is now always done at the DEBUG level
2019-07-16 16:42:28 -06:00
6928485965
Added print functions
...
* Uses new method for printing in color (no global var usage)
2019-07-13 19:01:57 -06:00
bdf53b435a
Added placeholder files for submodules
2019-07-13 17:45:39 -06:00
36e70c48ba
Adjuested log_path under Windows
2019-07-13 17:42:44 -06:00
f30a6dd3db
Typo fix
2019-07-13 17:29:30 -06:00
8b4daa507b
Use different default log_path under Windows
2019-07-13 17:23:35 -06:00
b98397d491
Include seconds in default log name
2019-07-08 17:32:17 -06:00
ca67ed392f
Avoid clobbering existing files
2019-07-08 16:56:03 -06:00
23eda17bd3
Ensure logging is shutdown when exiting
2019-07-08 16:55:39 -06:00
acd92b3e50
Added logging functions
...
* Logging is always initialized if importing the whole package
* Support switching to DEBUG mode
* Support changing the log dir (and optionally log name)
2019-07-07 22:09:22 -06:00
4cc54011b7
Added version check
2019-07-07 22:02:48 -06:00
dfde06a2fd
Updated __init__ files
2019-06-29 21:33:47 -06:00
f7a114ee44
Added cfg/logging.py and cfg/main.py
2019-06-29 21:23:37 -06:00
0427d2586f
Added ask and pause functions
2019-06-29 20:52:38 -06:00
96837ff774
Going to use the logging module for logging
2019-06-29 19:58:44 -06:00
bca9c19053
New safer text input function
...
* Avoids EOFError exceptions and just repeats the prompt
2019-06-29 19:54:02 -06:00
b368b27faa
New project organization
...
* Script work is brought into better focus
* New layout will be used to better package the python scripts
* No hidden folders (they will be hidden at build time)
* All building should be done under setup/
* Avoids ambiguous .bin/.cbin folders at root of project
2019-06-28 18:06:43 -06:00