Skip to main content

A simple README generator for Python projects.

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
┣━ 📄 .gitignore
┣━ 📄 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.
    • 🐍 repo_structure.py: Defines the repository structure for the README.
  • 📄 .gitignore: Specifies files and directories to be ignored by Git.
  • 📄 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 readme-generator

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 venv __pycache__ .egg-info \
	--exclude_files .jpg .png .txt

Parameters

  • --repo_path: Specifies the path to the repository for which the README will be generated.

    • Example: "C:\path\to\your\repository"
  • --overview: Provides a brief description of the project to include in the README.

    • Example: "This is a sample README generated by the script."
  • --exclude_dirs: Lists directories to exclude from the repository structure in the README.

    • Example: venv __pycache__ .egg-info
  • --exclude_files: Lists file extensions or specific files to exclude from the repository structure in the README.

    • Example: .jpg .png .txt

Python Version

It can also be run using the following python code:

from pathlib import Path
from readme_generator.generate_readme import generate_readme

repo_path = Path(__file__).resolve().parent
generate_readme(
	repo_path,
	overview="This is a sample README generated by the script.",
	exclude_dirs={"venv", "__pycache__", ".egg-info"},
	exclude_files={".jpg", ".png", "txt"}
)

Last updated on 2025-05-09 23:09

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-1.4.0.tar.gz (5.7 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-1.4.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tree_readme-1.4.0.tar.gz
Algorithm Hash digest
SHA256 c545aa7638717f3e669d8b461c3b421d27b32fec9fbf9ac3cade20c08ee7994a
MD5 9f7bef40d8df74803a386a605c453429
BLAKE2b-256 3eda5366bd4b3b98d49c0210f4bd41914ca4c12cc74752a18927e454ec0c4839

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_readme-1.4.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-1.4.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for tree_readme-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3b89faf95fec06d6d41cd3347f7170153668e5e2017a3bd39de2c8a13b6e423
MD5 5476e0a2778cd603b8350a45965dffc0
BLAKE2b-256 01772a2ebb7fffe0939db522911e839a16ca1552498a43ae63c3af5214fb2a0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_readme-1.4.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