Skip to main content

A tool for flexibly managing templated docs of all kinds.

Project description

Pape Docs

Pape Docs is a command-line interface (CLI) tool designed to simplify the creation and management of templated documentation. It provides a straightforward, opinionated system for generating various types of documents (e.g., ADRs, tasks, notes) from predefined templates, ensuring consistency and reducing overhead.

Features

Streamlined Document Creation

The core functionality is provided by the new-doc script, which allows users to quickly create new Markdown documents based on pre-defined templates.

Usage:

uvx pape-docs new

Or, with pape-docs installed via uv as a tool (see installation instructions below):

new-doc

Options:

  • --priority <PRIORITY>: Optional priority number for the document (e.g., "0100", "????" for unknown).
  • --doc-type <DOC_TYPE>: Optional document type (e.g., "ADR", "Task", "Notes", "Bug").

Robust Interactivity (Planned)

The new-doc script is designed to support both interactive and non-interactive modes.

  • Interactive Mode (Default):
    • Prompts for required arguments (like the document title) if not provided via command-line options.
    • Re-prompts for invalid non-empty responses, providing reasonable defaults for empty responses.
  • Non-Interactive Mode (Planned Option):
    • Will execute without any interactive prompts.
    • Will throw an error if any required arguments (e.g., title) are missing.

Flexible Docs Directory Location

The script intelligently locates the pape-docs/ directory where new documents should be placed. The search order is:

  1. An environment variable (PAPE_DOCS_DIR).
  2. A pyproject.toml file in the current or parent directories, looking for [tool.pape-docs]."docs-dir".
  3. An existing pape-docs/ directory in the current or parent directories.

If none is found, the script exits before the user wastes time entering other information

Packaged Template

Pape Docs comes with one pre-defined doc.md template. It's bundled with the application and are not user-configurable. This design choice reinforces the opinionated nature of the tool, aiming to prescribe a simple and consistent documentation system.

Installation

If you want to add new-doc (and pape-docs) to your $PATH, you can install this package as a uv tool.

uv tool install pape-docs

uv allows updating tools with uv tool upgrade [tool-name] or uv tool upgrade --all.

Development

Setup

  1. Clone the repository.

  2. Install dependencies using uv (or pip):

    uv pip install -e .
    uv pip install -e ".[dev]"
    

Linting and Formatting

This project uses ruff for linting and formatting.

ruff check .
ruff format .

Testing

Tests will be written using pytest.

pytest

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

pape_docs-0.4.0.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

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

pape_docs-0.4.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file pape_docs-0.4.0.tar.gz.

File metadata

  • Download URL: pape_docs-0.4.0.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.22

File hashes

Hashes for pape_docs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 94360e814662944f926eb295f69dac3528b7400e971d5f46bbc0205bdc5e84cb
MD5 a0927f0e0c758c6582d4a8b8b6eaa089
BLAKE2b-256 1525f78ee0dd8f8e26d7597dff2aad04f55e7e31237ef6d050b5e24befe28789

See more details on using hashes here.

File details

Details for the file pape_docs-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pape_docs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.22

File hashes

Hashes for pape_docs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 966acadbc520b1ebba5364a74eb6ab4322c2792a2fb99a1ca9d235eaa51b3625
MD5 b716f586ed57ea04bd29b6a04febcb16
BLAKE2b-256 9aaf9ccfb10806ba9d2a6412fdf246c40cfc530c80b522f1a593a2f35b2296c1

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