A lightweight Python library for extracting comprehensive information from directories
Project description
Directory Info Extractor
A lightweight Python library for extracting comprehensive information from directories. It provides an easy way to retrieve project structure and file contents, with customizable inclusion and exclusion patterns. Ideal for project analysis and documentation.
Installation
You can install the Directory Info Extractor using pip:
pip install directory-info-extractor
Usage
Here's a quick example of how to use the Directory Info Extractor:
from directory_info_extractor import get_directory_info
info = get_directory_info(
"/path/to/your/directory",
include_patterns=["*.py"],
exclude_patterns=["*.pyc", "__pycache__"],
recursive=True
)
print(info)
Features
- Retrieve project structure
- Extract file contents
- Customizable file and directory inclusion patterns
- Customizable file and directory exclusion patterns
- Optional recursive directory traversal
- Optional logging of results
Main Function Parameters
dir_path(str): Path to the local directory.include_project_structure(bool): Include project structure in the output.include_file_contents(bool): Include file contents in the output.include_patterns(List[str], optional): Patterns to include (e.g., [".py", "specific_folder/"]).exclude_patterns(List[str], optional): Patterns to exclude.recursive(bool): Whether to recursively search subdirectories.log_path(str, optional): Path to save the log.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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
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 directory_info_extractor-0.1.1.tar.gz.
File metadata
- Download URL: directory_info_extractor-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4f4fe7134d449841640b969694f95f0c1f3a48b61c2c064cbd408c224671602
|
|
| MD5 |
7ce3248a6c2c6f6d421ed2978decdcd4
|
|
| BLAKE2b-256 |
96d56e381dad3dfc852144c212ebeb198a867c11832b99d2912e125e08f737a8
|
File details
Details for the file directory_info_extractor-0.1.1-py3-none-any.whl.
File metadata
- Download URL: directory_info_extractor-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd67602fe2c94ec2edca311d61af878ba7df69dce061e6c326aea36719b9a151
|
|
| MD5 |
5eba0d5a2ba72fdfead38dc552ae9b29
|
|
| BLAKE2b-256 |
82a4988293b2d953252efdef68cec2ec0d4d1ee639fe27baf7865acddd19800e
|