Commit graph

36 commits

Author SHA1 Message Date
54281d52c2
Some linting fixes. 2022-08-14 10:42:34 -07:00
389f22faff
Make better use of generators when searching file text. 2022-02-12 12:03:07 -08:00
7dff1f24c0
Use callback_permission_denied=do_nothing. 2021-12-21 16:59:39 -08:00
5fb31208c9
Add vlogging so we can get debug from imported modules. 2021-11-16 13:54:42 -08:00
701cf3e0d3
Use pathclass.read, write. 2021-10-04 17:21:14 -07:00
4a9051e617
Big migrations and linting.
With pathclass.glob_many, we can clean up and feel more confident
about many programs that use pipeable to take glob patterns.

Added return 0 to all programs that didn't have it, so we have
consistent and explicit command line return values.

Other linting and whitespace.
2021-09-23 23:42:45 -07:00
02518a96a3
Replace clipext.resolve with pipeable.input(split_lines=False). 2021-08-17 14:06:07 -07:00
05d59c2149
Migrate scripts from spinal.walk_generator to spinal.walk. 2021-05-17 17:00:51 -07:00
51188b30ee
Remove redundant argparse dest=, fix some lint issues. 2021-02-20 21:01:55 -08:00
96a4520c9c Let generic text search always show line numbers. 2021-01-01 16:22:18 -08:00
4b8f8f6c77 Add ctrlc_return1 to search.py. 2020-12-06 15:01:56 -08:00
e9b5af6e4f Add --dirs, --files to restrict search. 2020-12-05 14:49:10 -08:00
844dc5894b Fix behavior of --all being both positional and named arg. 2020-11-20 02:21:15 -08:00
482c787f79 Add custom exception NoTerms. 2020-11-20 02:21:15 -08:00
24db0d5919 Don't overwrite user-provided line_numbers for content_args. 2020-10-01 20:19:09 -07:00
81d0761292 Use pathclass.Path.open. 2020-09-20 18:27:28 -07:00
8f448ba554 Add argument --strip to strip whitespace from results.
Useful when searching content inside html files etc.
2020-09-11 16:09:58 -07:00
fa3d12a782 Don't add line number to result_text if we're skipping this result. 2020-09-11 16:07:51 -07:00
dbd21deb9e Add skewer-case aliases for snake_case arguments. 2020-08-12 10:23:20 -07:00
845eebf40f Add argument root_path to start a search from somewhere else. 2020-02-15 18:03:04 -08:00
dc48da8a27 main should return args.func(args) value. 2020-02-08 17:23:43 -08:00
a5c8887f47 Only perform plain in search if neither glob nor regex enabled. 2020-02-03 20:25:11 -08:00
09d3c576e6 Switch off breadth first because that's gone from spinal now.
See voussoirkit commit 3ff49e1.
2020-01-31 20:27:03 -08:00
17aabe961d Take advantage of pathclass.Extension comparison functionality. 2020-01-29 16:39:08 -08:00
6d17ed725f Use winglob.fnmatch instead of python fnmatch. 2020-01-28 17:43:47 -08:00
7e8e20d038 Also search .lnk arguments. 2020-01-25 18:27:55 -08:00
66c26fa31a Improve lnk searching by separating field names from content.
Previously, if you searched for the word target then every lnk
matched because "Target: xxx" was literally the text being searched.
Now we can use the existing separation between search_text and
result_text to show those headers separately.
2020-01-25 01:18:03 -08:00
d108670693 Allow passing a pre-formed list as text. 2020-01-25 01:11:11 -08:00
ea415b953c Rename these key, value variables to give better context. 2020-01-25 01:08:50 -08:00
2dc7e75414 Dedent even more. Thanks continue! 2020-01-25 00:58:06 -08:00
77481c169c Comment this whole if and not just the inner part. 2020-01-25 00:52:39 -08:00
1727be598a Switch this formatter to fstring. 2020-01-25 00:49:08 -08:00
91bf90862b Dedent this code by reversing condition and continue. 2020-01-25 00:46:52 -08:00
9d8c9fdf51 Support searching of windows .lnk file fields.
I'm currently migrating my shortcuts that point to Py 3.7 to 3.8
so this saves a lot of time!
2020-01-25 00:39:18 -08:00
08782fdaf9 Extract code to function search_contents_generic. 2020-01-25 00:36:50 -08:00
f44e46aab5 Initial commit. 2019-06-11 22:41:31 -07:00