Skip to main content

A powerful documentation generator that creates beautiful markdown documentation from source code

Project description

DocGen - Beautiful Documentation Generator

A powerful documentation generator that creates beautiful markdown documentation from source code.

Features 🌟

  • 📝 Interactive wizard mode for easy configuration
  • 🌳 Project tree visualization
  • 📚 Table of contents with customizable formats
  • 🔍 Collapsible sections for better organization
  • 📊 File statistics and line counts
  • ⚡ Fast project reports
  • 🎨 Syntax highlighting for multiple languages
  • 📋 Line numbers in code blocks
  • 🔗 Clickable navigation links
  • 🎯 Customizable output formats
  • 🔄 CLI command generation for repeatable documentation
  • 🎯 Fast project reports for quick insights

Requirements 🛠️

  • Python 3.7 or higher
  • Works on Windows, macOS, and Linux

Installation 📦

You can install DocGen directly from PyPI:

pip install py-code-docgen

For development installation:

git clone https://github.com/ci-psy/DocGen.git
cd docgen
pip install -r requirements.txt

Quick Start 🚀

  1. Interactive Mode (Recommended):
py-code-docgen -i
  1. Command Line Usage:
py-code-docgen [project_dir] -o output.md --include "py,js,cpp"
  1. View Help and Options:
py-code-docgen --help

Command Line Options 🎮

usage: py-code-docgen [-h] [-i] [--fast-report] [-o OUTPUT] [--include INCLUDE]
                      [--show SHOW] [--show-all] [--no-collapsible]
                      [--collapsible-level {all,main,subsections,none}]
                      [--minimal] [--line-numbers] [--no-summary] [--no-tree]
                      [--no-file-info] [--no-line-count] [--no-file-stats]
                      [--no-timestamps] [--no-sizes] [--no-toc]
                      [--toc-format {full,name_ext,name}] [--no-toc-anchors]
                      [--toc-anchor-style {simple,full_path}] [--path-info]
                      [--chunk-size CHUNK_SIZE]
                      [project_dir]

Interactive Wizard Features 🧙‍♂️

The interactive wizard (-i flag) provides a user-friendly way to configure your documentation:

  1. Optional Fast Report: Get a quick overview of your project before proceeding
  2. Step-by-Step Configuration: Guided setup for all documentation options
  3. CLI Command Generation: After configuration, you can view the equivalent CLI command to:
    • Save it for future use
    • Automate documentation generation
    • Share your exact configuration with others

Example of generated CLI command:

py-code-docgen "my_project" -o "docs.md" --include "py,js" --toc-format full --collapsible-level main --line-numbers

Examples 📋

Generate documentation with default settings:

py-code-docgen .

Generate minimal documentation for Python files:

py-code-docgen --include py --no-toc --minimal

Generate documentation with full paths and main section collapsing:

py-code-docgen --include cpp --toc-format full --collapsible-level main

Generate a quick project report:

py-code-docgen --fast-report

Output Customization 🎨

TOC Formats

  • Full paths: dir/subdir/file.ext
  • Name with extension: file.ext
  • Just name: file

Collapsible Sections

  • All sections
  • Main sections only
  • Subsections only
  • None (disabled)

Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request.

License 📄

This project is licensed under the MIT License - see the LICENSE file for details.

Author ✨

Created by Cosmo Inclan

Acknowledgments 🙏

Special thanks to all contributors and users of DocGen!

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

py_code_docgen-0.1.6.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

py_code_docgen-0.1.6-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file py_code_docgen-0.1.6.tar.gz.

File metadata

  • Download URL: py_code_docgen-0.1.6.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for py_code_docgen-0.1.6.tar.gz
Algorithm Hash digest
SHA256 6ce7d23b5e24f1ebe779054395116bf8b262b41820a1c4ad08e521e470622d71
MD5 3f1ddc669ba51c6c4f16b7c8105badba
BLAKE2b-256 c7425f366813eed6c4dff3f35ff5604dae82a9b0aa6309ce9a9a4edca9ebbab2

See more details on using hashes here.

File details

Details for the file py_code_docgen-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: py_code_docgen-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for py_code_docgen-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8123fadc2a76a3e2cc8d34e5a8076210c28322ab89061504e316492482f91170
MD5 bc3a606f4c76a32810c70ea076315c7d
BLAKE2b-256 802f0ada2f48fef9714a37c9a4b19a4384d799e806d40eda7a20ae478eedb11a

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