Commit Graph

354 Commits (d3a1578ccaa1dfaca5dbe33132cd103fed08fd17)

Author SHA1 Message Date
voussoir d3a1578cca
Add some type annotations to test the waters. 2021-08-22 20:48:34 -07:00
voussoir 98ee6e82c6
Improve various docstrings. 2021-08-22 20:46:12 -07:00
voussoir 81f81a6c24
Don't log exit status if --operatornotify/level wasn't passed. 2021-08-22 19:50:04 -07:00
voussoir 9c880f2825
A few docstring improvements. 2021-08-21 15:20:11 -07:00
voussoir 4c4fae62cf
Delete clipext.py. 2021-08-17 14:01:00 -07:00
voussoir 8ce994a54b
Replace use of clipext with pipeable, split_lines=False. 2021-08-17 14:00:29 -07:00
voussoir cb5228fe0c
Add argument split_lines for when you just want the whole text.
Calling '\n'.join(pipeable.input()) is not great because in many
situations, you're splitting text and joining it back together again
for no reason. With this option, we can let the code do the right
thing, and use pipeable as a general-purpose inputter in
more situations.
2021-08-17 14:00:11 -07:00
voussoir db8c6e42e3
Add TypeError if arg is not a string. 2021-08-17 13:48:57 -07:00
voussoir f5e5db1908
Let hms use pipeable.input_many instead of go. 2021-08-17 13:46:47 -07:00
voussoir 93605e2577
Split long useragent string. 2021-08-13 23:40:29 -07:00
voussoir 6442e8e40c
Fix ctrlc_return1 to return the wrapped return value. 2021-08-13 23:40:29 -07:00
voussoir 14dcbda9fd
Add networktools, though some ideas are still not implemented. 2021-08-13 23:40:28 -07:00
voussoir 1d6f9eee10
Add niceprints.py. 2021-08-13 23:40:28 -07:00
voussoir 72fdcb2b04
Clarify pipeable.input_many docstring. 2021-08-11 01:01:14 -07:00
voussoir cdf551f28a
Let glob_filenames, glob_directories be singular strings. 2021-08-11 01:01:02 -07:00
voussoir eddd7b3818
Remove set_level_by_argv. 2021-08-10 11:54:04 -07:00
voussoir 61db9296c8
Improve some docstrings. 2021-08-10 11:53:55 -07:00
voussoir 16d9b85e62
Various lint appeasements. 2021-08-10 11:37:01 -07:00
voussoir 63251b979b
Describe Path parameters in docstring. 2021-08-09 16:27:33 -07:00
voussoir 81782383a9
Use regular path.join when constructing glob patterns.
I don't like the idea of having an intermediate Path object that isn't
a real path.
2021-08-09 08:36:20 -07:00
voussoir 41dd3eb0db
Clarify docstring reference to LogHandlerContext. 2021-08-09 08:35:12 -07:00
voussoir 47e3a9d7d4
Add imagetools.pad_to_square. 2021-08-09 08:34:58 -07:00
voussoir c65743ec02
Use random.choices instead of random.choice in a loop. 2021-08-09 08:33:02 -07:00
voussoir 13bf8e2e47
Improve Windows reserved name check by adding to pathclass. 2021-07-24 12:24:24 -07:00
voussoir a12bc59b17
Remove some old unnecessary globals. 2021-07-24 12:21:51 -07:00
voussoir 6fb996f153
Bump to version 0.0.66. 2021-07-06 20:31:51 -07:00
voussoir 7545433253
Improve some docstrings. 2021-07-04 15:45:00 -07:00
voussoir e9d450029d
Log the program's final return when using @main_decorator. 2021-07-04 15:44:50 -07:00
voussoir f18f0fd2df
Remove option log_exception, always log it under our logger.
This unifies the thought process so that everything is done via the
log lines, not these separate config variables. Caller can mute this
module if they want to. Also, it was previously appending directly
to the message but now we can have our logger's name on it so it's
more clear who's reporting what.
2021-07-04 15:42:57 -07:00
voussoir 2971d7e4d6
Improve operatornotify module docstring. 2021-07-02 02:59:34 -07:00
voussoir 26040d4372
Use vlogging.main_decorator. 2021-07-02 02:59:14 -07:00
voussoir 4aed87b522
Fix downloady.is_special_file. 2021-07-01 15:50:57 -07:00
voussoir c709a28d08
Add operatornotify.main_decorator to reduce application boilerplate. 2021-06-21 22:02:43 -07:00
voussoir 81d09ad3bc
Add vlogging.main_decorator to reduce application boilerplate. 2021-06-21 21:54:42 -07:00
voussoir 9cd7713a6b
Replace call to basicConfig with own handler. 2021-06-21 21:53:36 -07:00
voussoir 689b8f5718
Let rotate_by_exif return new exif with orientation=1. 2021-06-06 20:29:29 -07:00
voussoir 663e65795a
Add flasktools.make_json_response. 2021-06-04 21:48:04 -07:00
voussoir ee8c4b7fd8
Add ensure_response_type decorator.
So that all further decorators or response-processors know they
have a Response object.
2021-06-04 21:26:23 -07:00
voussoir 45da148493
Add globals REQUEST_TYPES, RESPONSE_TYPES. 2021-06-04 20:58:31 -07:00
voussoir 68d12e4900
Pass _case_correct=True on trusted values to speed up walk. 2021-06-04 13:07:59 -07:00
voussoir b3e0b310c2
Include starting path in blacklist check but not whitelist. 2021-06-04 13:06:10 -07:00
voussoir 1d555d20dc
Switch to image.getexif, official as of pillow 6. 2021-06-03 21:11:19 -07:00
voussoir a36c5ca478
Add stringtools.natural_sorter. 2021-05-30 21:35:21 -07:00
voussoir 96a0e177e6
Move ORIENTATION_KEY to global. 2021-05-30 21:34:29 -07:00
voussoir eeba8c1197
Bump to version 0.0.65. 2021-05-26 15:07:32 -07:00
voussoir db60b84ede
Don't bother with 1-element list, just do it right away. 2021-05-25 01:45:34 -07:00
voussoir 4741946eda
Do None check before isinstance check. 2021-05-18 23:26:44 -07:00
voussoir 2d8d51a4f1
Docstring updates for many functions. 2021-05-18 17:48:57 -07:00
voussoir 375b00bfd5
Add dynamic chunk sizing to keep consistent progress bar pace. 2021-05-18 17:48:35 -07:00
voussoir e7798574b3
Rename argument fpobj -> path. 2021-05-18 17:45:25 -07:00