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

Uploaded Python 3

File details

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

File metadata

  • Download URL: easy_code_to_text-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 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.0.tar.gz
Algorithm Hash digest
SHA256 434dd2eac8891659e65167faf744bc7f7165e8c533e8e5ade1ba438dceb54deb
MD5 704f0543ab4e2948bd8500e7d7ad0e36
BLAKE2b-256 5a72e8e169fbbf5fb10d364864e1648b24bfc3636533604c7f1f7195a55563da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for easy_code_to_text-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d70f7ec2fffa82f22e48b4f62c1c4909ddaada8476e683a19e39cf1f72910f0
MD5 140aac930bde0258d70a3524c04d16f6
BLAKE2b-256 735aa17378b38c1e62eeac61e9a1e7a3965b64e41866ca6e6fbd1b57943b7e9f

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