Skip to main content

A tool to extract content from text files in a directory, with options to ignore certain files and directories.

Project description

FileContentExtractor

Languages: English | 한국어

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 .ignorelist file.
  • 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

  1. Run the command:

    • Default usage (relative paths):

      file_extractor
      
    • Use absolute paths:

      file_extractor --absolute
      
  2. Ignore list:

    Create a .ignorelist file to specify files, directories, or patterns to ignore:

    • *.log - Ignore all files ending with .log
    • __pycache__ - Ignore the __pycache__ directory
    • src/data/* - Ignore all files in the src/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

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

file_content_extractor-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

file_content_extractor-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

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

Hashes for file_content_extractor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 98b2e7da843ab13e33026c640b277a55c12b4d7ff4edd3ff28f8e83817abd474
MD5 99a502ac5d8abba1c08f646a6935fcfb
BLAKE2b-256 a38fee7f329aabd5e8c13b4bda31dfe87415d1fee348c28cf37380bab6a45134

See more details on using hashes here.

File details

Details for the file file_content_extractor-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for file_content_extractor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2245612b418e7de58b2b3af228f9baf49c77573230e8807eeb2fe06ff761d19d
MD5 0cc31a887c9697961d58228919d15733
BLAKE2b-256 ed929a959facd9dff62ceaff2a2315e90f42580a7fa126b35ddb3c2b4bc10a10

See more details on using hashes here.

Supported by

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