Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

zind-0.1.3-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page