A tool to extract content from text files in a directory, with options to ignore certain files and directories.
Project description
FileContentExtractor
FileContentExtractor is a Python package designed to recursively extract and save the contents of text files in a directory. It provides options to ignore specific files or directories and outputs file paths as either absolute or relative paths.
Features
- Recursively traverses directories and extracts the content of text files.
- Allows you to ignore specific files, directories, or patterns using a
.ignorelistfile. - Outputs file paths as either relative or absolute paths.
- Skips non-text files (like binary files).
Installation
You can install the package via pip:
pip install file-content-extractor
Usage
-
Run the command:
-
Default usage (relative paths):
file_extractor
-
Use absolute paths:
file_extractor --absolute
-
-
Ignore list:
Create a
.ignorelistfile to specify files, directories, or patterns to ignore:*.log- Ignore all files ending with.log__pycache__- Ignore the__pycache__directorysrc/data/*- Ignore all files in thesrc/data/directory
Contributing
Contributions are welcome! Feel free to submit a Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Author
- Daniel - joonheeu - daniel@udit.one
- Company: UDIT
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 file_content_extractor-0.1.1.tar.gz.
File metadata
- Download URL: file_content_extractor-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98b2e7da843ab13e33026c640b277a55c12b4d7ff4edd3ff28f8e83817abd474
|
|
| MD5 |
99a502ac5d8abba1c08f646a6935fcfb
|
|
| BLAKE2b-256 |
a38fee7f329aabd5e8c13b4bda31dfe87415d1fee348c28cf37380bab6a45134
|
File details
Details for the file file_content_extractor-0.1.1-py3-none-any.whl.
File metadata
- Download URL: file_content_extractor-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2245612b418e7de58b2b3af228f9baf49c77573230e8807eeb2fe06ff761d19d
|
|
| MD5 |
0cc31a887c9697961d58228919d15733
|
|
| BLAKE2b-256 |
ed929a959facd9dff62ceaff2a2315e90f42580a7fa126b35ddb3c2b4bc10a10
|