Skip to main content

A Python package to concatenate code files into a single text file.

Project description

easy_code_to_text Project

A Python package to concatenate code files into a single document, with support for multiple programming languages and customizable ignore patterns.

Features

  • Support for multiple programming languages including Python, JavaScript, HTML, CSS, Java, and YAML.
  • Customizable ignore patterns to exclude specific files or directories.
  • Generates a single document with clear demarcation for each file's path and language.

Installation

The package can be installed via pip:

pip install code_to_text

Usage

After installation, you can use the package as follows:

from code_to_text import read_and_combine_files

read_and_combine_files(input_directory='your_code_directory', output_file='your_output_file.txt', ignore_file_path='your_ignore_file.txt')

Configuration

Ignore File

Create an ignore file (e.g., .codeToTextIgnore) in your project root with patterns to ignore:

*.log
node_modules/
build/

Contributing

We welcome contributions! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch for each feature or improvement.
  3. Submit a pull request with a comprehensive description of changes.

License

This project is open source and available under the MIT License. Benjamin QUINET.

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

easy_code_to_text-0.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

easy_code_to_text-0.1.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file easy_code_to_text-0.1.1.tar.gz.

File metadata

  • Download URL: easy_code_to_text-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for easy_code_to_text-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e3eb23d9fbe5b4a911ab9f724cfc8d1ff5c6e5c0ad4eb11373f154b82f820765
MD5 96a8e3e84927ff287d53267988e339ba
BLAKE2b-256 a3da6e763bb6d2ab39d57c0d23d2970fb6100e57a91412430fdee57512b3db22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for easy_code_to_text-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64d5a086038484bd120e2e8501cdff408e481b4c865a754ac2f02cb469c43013
MD5 5e9e24234a4a8f731bf09b9f26eab62d
BLAKE2b-256 0531e23bea53377fea1c998d258eb31498561b0e8ffabf97dfd5cad3b6edca0f

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