No project description provided
Project description
findme
Lightweight python based shell utility for finding files on disk using regex.
Why?
The bash find
command has a --regex
option, which works great for one-off searches.
However, I didn't have a good way to remember the dozen or so patterns I was searching for daily, and then quickly compose them into a find --regex
call.
This tool is meant to streamline the process of remembering regex patterns, so you can search for them faster.
Installation
Use pip to install the find-patterns
python package: pip install find-patterns
This will install a shell script findme
as well as the python package find_patterns
.
Usage
Add a pattern to locate all python files on disk.
findme --add py --pattern "\.py$"
Add a pattern to locate all c++ template files
findme --add templates --pattern "\.(inl|\[ht]cc|\[ht]pp)$"
Add a pattern to locate all files named "activate". --files-only
is needed, since the file has no extension to match against.
findme --add activate --pattern "activate$" --files-only
Search for all c++ template files inside the given directory.
findme templates ./project_dir/include
Search for maya files and perform other operations with the filepaths.
findme maya | wc -l | ...
Remove the alias we previously created for python files.
findme --remove py
List all aliases that are assigned.
findme --list
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for find_patterns-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbd52e9b5ea6f8a0566e5e17c46dc910e1161a8bced3c8d6a28f6dd7df14690d |
|
MD5 | 2447821d5feb88d75abd652c60b26371 |
|
BLAKE2b-256 | 4496aadbbccdfff5ba62c5afbcba6873160abb5ff15936a67b6e62b525d62141 |