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 easy-code-to-text

Configuration

Ignore File

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

# Your environment files
.venv

# Your private files
.env

# Python cache and logs files
__pycache__
*.log

# Your output and ignore file
my_project_output.txt
.codeToTextIgnore

Usage

After installation, you can use the package as follows:

from code_to_text.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')

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: easy_code_to_text-0.1.6.tar.gz
  • Upload date:
  • Size: 4.1 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.6.tar.gz
Algorithm Hash digest
SHA256 d3f29492fbcc688539cb5042b8afc4418b81baba8d3f9c71b7b14f5a141ff036
MD5 9f68ad4346f411297dac7ff2dce5d69d
BLAKE2b-256 2c983e21373cc1f9a38e7b0e8306a5ba1b8cceb7334e7e9ec176a4fb27b0ffa7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for easy_code_to_text-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3fff0a75e41b7e33844e32f9a4c12f9d2dc465f4664d9c43f95502bb279c3f81
MD5 6eca7514ebddcccf2288f39e03c05c0d
BLAKE2b-256 0bb564b110306f4dd19c4ab601a252c7aecd0377aa03bacd1131d5ade38f74db

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