Skip to main content

A README generator for Python projects

Project description

ReadGen

tbi-readgen (0.0.7)

A simple yet powerful Python project README.md generator.

Features

  1. Read project information from pyproject.toml
  2. Read custom content from readgen.toml
    • Support variable substitution from pyproject.toml
    • Configure directory structure display with depth control
    • Toggle directory section display
  3. Scan the project directory structure
  4. Extract docstrings from __init__.py files in each folder
  5. Generate a standardized README.md

Installation

$ pip install tbi-readgen

# Recommendation, as it can be used globally.
$ pipx install tbi-readgen

Usage

CLI

$ readgen

# Overwrite README.md.
$ readgen --f

Project Configuration File

Create a readgen.toml file in the project root:

[Title]
title = "Method to overwrite [Title], with support for spaces."
content = "Content of the Title Block"

[Markdown]
content = """
## This is a markdown block
1. Read project information from pyproject.toml
2. Read custom content from readgen.toml
3. Scan the project directory structure
4. Extract docstrings from `__init__.py` files in each folder
5. Generate a standardized README.md

```bash
$ pipx install tbi-readgen
```
"""

[Variables]
content = """
Examples of variables from pyproject.toml:
- Use ${project.version} to get the project version
- Use ${project.name} to get the project name
"""


[directory] # `directory` is a built-in method and will not be listed.
title = "Directory Structure" # You can customize block names to override the default "Directory Structure."
content = "123"
enable = true # If `enable = false`, it won't list all directories or scan the init instructions.
exclude_dirs = [".git", "venv", "__pycache__", ".venv", "env", "build", "dist"] # Exclude directories from scanning.
depth_limits = { "root" = 1, "root/mother" = 2 } # List the depth of directories, list all by default.

Development

Setup

git clone https://github.com/yourusername/gcp-secret-manager-cli.git
cd gcp-secret-manager-cli
python -m venv venv
source venv/bin/activate  # Linux/Mac
pip install -e ".[dev]"

License

This project is licensed under the MIT License.

Directory Structure

  • readgen
    • src
      • src/readgen
        • src/readgen/utils: This folder is primarily used for storing commonly used utilities.

This document was automatically generated by readgen.

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

tbi_readgen-0.0.7.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

tbi_readgen-0.0.7-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file tbi_readgen-0.0.7.tar.gz.

File metadata

  • Download URL: tbi_readgen-0.0.7.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for tbi_readgen-0.0.7.tar.gz
Algorithm Hash digest
SHA256 0b639adbdc8483443ad1fa108cca2f252634bd8752d649f32a437906ae142f8e
MD5 74136cb9803c231b7849b7d197474fd1
BLAKE2b-256 7928f67aa66c4aede5788f786c10ef2aa9d01c860402a52e417595e514b960db

See more details on using hashes here.

File details

Details for the file tbi_readgen-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: tbi_readgen-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for tbi_readgen-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ace964aa65a210b234e62095eede44c8def68a76871c6c1b96a20008763b8f83
MD5 ca7bd402e50dda80ff646596de7fa11f
BLAKE2b-256 2f255650d9b561466dc84a8994df3d4626d5e10be28b89465c6c205192043158

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