Walk a filesystem with configurable path and filename filters.
Project description
zind
Walk a filesystem with configurable path and filename filters.
Python Zind
zind is library for walking the filesystem and scanning files with configurable path and text filters.
Zind features
- Walk filesystem
- Filter files and directories using configurable filters
- Print lines of text in files
- Filter lines of text using configurable filters
- Pure Python - no dependencies
Installation
pip install zind
Zind Cli
Some examples of the zind cli would look like this:
# Walk the filesystem
$ zind
# Filter out all paths that contain the text 'node_module'
$ zind -ge node_module
# Only include paths with the text 'py'
$ zind -g py
# Only include paths that end with the text py
# zind -gr ".*py$"
Cli Usage
Filesystem files and directories can be filtered based on input tokens. -g will only return lines with matching text. -ge will exclude lines with matching text. -gr will use regex matching to include text. -gc will enforce case sensitive matches. The options can be mix and matched. -gre ".*.py$" will exclude all files ending in .py.
Files can be scanned line by line as well. -t will cause the tool to print matching lines within files that contain the matching text. -te will exclude matching lines in text.
Getting Started
The most simple example of the api would look like this:
from zind.api.core_find import Find
find = Find()
file_matches = find.find(".",[])
for file_match in file_matches:
print(file_match)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zind-0.1.3-py3-none-any.whl.
File metadata
- Download URL: zind-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ec19215c3964ebc500757f17c5b2be677c14ffda0cd29f75f1d71659e86c77d
|
|
| MD5 |
1bb9b4411cce7df93dec4402635f0b9c
|
|
| BLAKE2b-256 |
fa92b1dfb66a8ab6b3e185ab7d6b5fee3fe3f3b9a9e0895cf4f66a6fbe07b2a7
|