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.0.tar.gz (3.6 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.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: file_content_extractor-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 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.0.tar.gz
Algorithm Hash digest
SHA256 a7e0826af210f7e63d2d9e003ba04d298081419a1787b77721b6fbcc4d8a9801
MD5 e242df726f6e0a8e3eb7f96b609096bb
BLAKE2b-256 0eb1d705c897cc47dd701e605a2986e8e410d6b812f934fea48cca5658f5cd72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for file_content_extractor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51465f4c2c7657b95c0d02f6dc72dfb0ff78804acceaeff252c68be696369aa3
MD5 1c91fdcaa61c6e3e39a2aa1e8dd84929
BLAKE2b-256 377b5074106fb17b6ca1266c80adff0e83c00f4b20bbaa59c248abff6e8d2df1

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