Skip to content

GunjaGupta1233/Paste-to-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

One-Codebase 🚀

License Version Python

One-Codebase is a Python library designed to help developers generate structured codebase outputs, visualize directory structures, and easily locate files within a project. Whether you're working on a small script or a large-scale project, this library simplifies codebase management and exploration.


Features ✨

  • Directory Structure Visualization: Generate a clean and readable tree structure of your project's directory.
  • File Content Extraction: Extract and display the content of files within your project.
  • Customizable Ignore Lists: Exclude specific files or directories (e.g., .git, __pycache__) from the output.
  • File Path Search: Quickly locate and copy the relative path of a specific file within your project.
  • Unicode Support: Handles file reading with proper encoding (UTF-8 and fallback to Latin-1).

Installation 📦

You can install one-codebase using pip:

pip install one-codebase

Usage 🛠️

1. Generating a Codebase String

Use the Prompter class to generate a structured output of your project's directory and file contents.

from one_codebase import Prompter

# Initialize the Prompter with your project name
prompter = Prompter(project_name="your_project_name")

# Generate the codebase string
codebase_output = prompter.generate_codebase_string()
print(codebase_output)

Documentation 📚

For a more detailed guide on how to use this library, including advanced features and examples, please refer to the official documentation.


Configuration ⚙️

The Prompter class and other functions support the following parameters:

  • include_git: Include .git directories in the output (default: False).
  • include_pycache: Include __pycache__ directories in the output (default: False).
  • ignore_items: A set of file or directory names to exclude from the output.

Contributing 🤝

We welcome contributions! If you'd like to contribute to one-codebase, please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bugfix.
  3. Submit a pull request with a detailed description of your changes.

Please ensure your code adheres to our Code of Conduct.


License 📜

This project is licensed under the Personal Use License Agreement. See the LICENSE file for details.


Code of Conduct 📜

Please read our Code of Conduct to understand the expectations for behavior within our community.


Support 💬

If you have any questions, issues, or feedback, please open an issue on the GitHub repository or contact us at [email protected].


Acknowledgments 🙏

  • Inspired by the need for better codebase management tools.
  • Thanks to the Contributor Covenant for the Code of Conduct template.

Happy coding! 🎉

About

You can paste the image to download

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published