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.2.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.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file file_content_extractor-0.1.2.tar.gz.

File metadata

  • Download URL: file_content_extractor-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 eec949c37cda84e54bc31a4cea627851259d162c248e98d620ceffee29893490
MD5 63f642c7d684710f8b30a9a790081366
BLAKE2b-256 01da7d18ec6ac81689e76bf8d1f32ef01a67d6cb1530f403942bab810deb09df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for file_content_extractor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 98a1c6e52d0b2c3ac82aefac8d3df3d0da0dfd5021c9eb5791d5a91ea292367a
MD5 5b48cdb0cf8e3d942f382cb4ce45a4fc
BLAKE2b-256 b1d7a59113973dcba181f4b60f94ba3f4e36abf996b005f3154fee1873ae1a86

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