Skip to main content

Generate clear, structured README files from your repository tree.

Project description

readme-generator

Overview

This is a sample README generated by the script.

Folder Structure

┣━ 📁 .github
┃  ┗━ 📁 workflows
┃     ┗━ 📜 python-publish.yml
┣━ 📁 readme_generator
┃  ┣━ 🐍 __init__.py
┃  ┣━ 🐍 emoji_map.py
┃  ┣━ 🐍 generate_readme.py
┃  ┣━ 🐍 readme_builder.py
┃  ┗━ 🐍 repo_structure.py
┣━ 📁 tests
┃  ┗━ 🐍 test_readme_generator.py
┣━ 👻 .gitignore
┣━ 🐚 install_package.sh
┣━ ⚙️ pyproject.toml
┣━ 📖 README.md
┗━ 📃 requirements.txt

Files Description

  • 📁 .github: Contains configuration files for GitHub-specific workflows and actions.
    • 📁 workflows: Contains GitHub Actions workflows for automating tasks.
      • 📜 python-publish.yml: Contains GitHub Actions workflow configuration for automating Python package publishing.
  • 📁 readme_generator: Contains the main Python package for the project.
    • 🐍 __init__.py: Marks the folder as a Python package.
    • 🐍 emoji_map.py: Maps file types to corresponding emojis for visual representation.
    • 🐍 generate_readme.py: Main script for generating the README file.
    • 🐍 readme_builder.py: Handles the logic for constructing the README content.
  • 📁 tests: Contains test modules for the project.
    • 🐍 test_readme_generator.py: Unit tests for the README generator functionality.
  • 👻 .gitignore: Specifies files and directories to be ignored by Git.
  • 🐚 install_package.sh: A shell script to install the package.
  • ⚙️ pyproject.toml: Configuration file for Python project dependencies and build system.
  • 📖 README.md: The generated README file for the project.
  • 📃 requirements.txt: Lists the Python dependencies required for the project.

Installation

To install the package, run the following command:

pip install tree-readme

Usage

To generate a README file, run the following command:

python -m readme_generator.generate_readme \
	--repo-path "/path/to/your/repository" \
    --overview "This is a sample README generated by the script." \
    --exclude-dirs ".git" \
	--exclude-dirs "__pycache__" \
	--exclude-dirs ".idea" \
	--exclude-dirs ".vscode" \
	--exclude-dirs ".ipynb_checkpoints" \
	--exclude-dirs ".egg-info" \
	--exclude-dirs "dist" \
	--exclude-dirs "_env" \
	--exclude-dirs ".pytest_cache" \
	--exclude-files ".pyc" \
	--exclude-files ".pyo" \
	--exclude-files ".pyd" \
	--exclude-files ".DS_Store"

Parameters

  • --repo_path: Specifies the path to the repository for which the README will be generated (defaults to the current working directory).

    • Example: "/path/to/your/repository"
  • --overview: Provides a brief description of the project to include in the README (defaults to an empty string).

    • Example: "This is a sample README generated by the script."
  • --exclude_dirs: Lists directories to exclude from the repository structure in the README file (defaults to .git, __pycache__, .idea, .vscode, .ipynb_checkpoints, .egg-info, dist, _env, and .pytest_cache).

    • Example: .git readme_generator .vscode .idea .ipynb_checkpoints .egg-info dist _env .pytest_cache
  • --exclude_files: Lists file extensions or specific files to exclude from the repository structure in the README file (defaults to .pyc, .pyo, .pyd, and .DS_Store).

    • Example: .pyc .pyo .pyd .DS_Store

Python Version

It can also be run using the following python code:

from pathlib import Path
from readme_generator.generate_readme import generate

repo_path = Path(__file__).resolve().parent
generate(
	repo_path,
	overview="This is a sample README generated by the script.",
	exclude_dirs={".git", "__pycache__", ".idea", ".vscode", ".ipynb_checkpoints", ".egg-info", "dist", "_env", ".pytest_cache",},
	exclude_files={".pyc", ".pyo", ".pyd", ".DS_Store"}
)

Last updated on 2026-04-04 17:40:57

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

tree_readme-3.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

tree_readme-3.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file tree_readme-3.1.0.tar.gz.

File metadata

  • Download URL: tree_readme-3.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tree_readme-3.1.0.tar.gz
Algorithm Hash digest
SHA256 492e350e066bca7aa10a19aa4e3cd8f3e7b51bb9620d11d2a2dd606ce2f5b0f2
MD5 26c99a15e8a5dcbff4ae37be14cd6aea
BLAKE2b-256 abba73d9083ab84f4e43a3530d5b2204cbb8aa84337d270928783cafb944c23a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_readme-3.1.0.tar.gz:

Publisher: python-publish.yml on kvbiii/tree-readme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_readme-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: tree_readme-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tree_readme-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae0287b05ff25b94a9a576bb6d975415abf64ee8c9a51f636f828401d6bc31d6
MD5 fd9b4bf67c5626f36145c514d9891e84
BLAKE2b-256 824410baa2296c5d0ae05dfcc0166c9964e402a0c09306683f23d1864a937b8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_readme-3.1.0-py3-none-any.whl:

Publisher: python-publish.yml on kvbiii/tree-readme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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