Skip to main content

PyPI version License: MIT Downloads

CodebaseLister

CodebaseLister is a Python package designed to document the contents of codebases. It lists all files and their contents, taking into account .gitignore rules if required. This tool is useful for developers who need a comprehensive overview of their project's structure and files.

Installation

To install CodebaseLister, you can use pip:

pip install CodebaseLister

Usage

As a Python Module

You can use CodebaseLister as a module in your Python scripts.

Example:

from codebaselister import CodebaseLister

# Initialize CodebaseLister with optional parameters
lister = CodebaseLister(base_path='path_to_your_project', use_gitignore=True)

# Generate the listing file
listing_details = lister.generate_listing_file()
print(listing_details)

Customizing Your Listing

You can customize the listing by adjusting the initialization parameters of the CodebaseLister class, such as base_path, use_gitignore, and output_filename, to fit the specific needs of your project.

Output Example

When you run CodebaseLister, it creates a text file listing all the files in the specified path (excluding those ignored by .gitignore if enabled) along with their contents. Here's an example of the output details:

{
    "output_filename": "listing_20240113_150223.txt",
    "chars_count": 12345,
    "file_size": 0.5,  # Size in MB
    "files_count": 100
}

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check issues page.

License

MIT

Metadata

Release files for CodebaseLister 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CodebaseLister 0.0.2
File Size Uploaded
CodebaseLister-0.0.2.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CodebaseLister 0.0.2
File Interpreter ABI Platform
CodebaseLister-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / CodebaseLister-0.0.2.tar.gz

Download URL CodebaseLister-0.0.2.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
77e29f88ea4af59f1168fb0c38936b2ddd548176547cd40a03c54cd7052afe58
BLAKE2b-256 checksum
How to use checksums
9eec5349297c3090db366c3aad5e7d7023cca1a7e4e4f381d7089c822a67b7ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Release files / CodebaseLister-0.0.2-py3-none-any.whl

Download URL CodebaseLister-0.0.2-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c0b6feccf21a5a66f71365dc21c87f348e440784a1f454ce5d972388b8171a8
BLAKE2b-256 checksum
How to use checksums
b483b864a07aaf4b245a7a32d6e74e8aa76e2a0a4f45052cafa6a1f2a630f0f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page