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:

new-doc [TITLE] [OPTIONS]

Options:

  • --simple: Use the simple template.
  • --complex: Use the complex template.
  • --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 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 docs/ directory in the current or parent directories.
  4. If no docs/ directory is found, the user is prompted to create one (defaulting to ./docs/).

Packaged Templates

Pape Docs comes with pre-defined simple.md and complex.md templates. These templates are 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

(Installation instructions will go here once the project is ready for distribution.)

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 are 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.1.1.tar.gz (19.0 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.1.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pape_docs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8ab24c813d6bdc9f33e18f2ca987e38898e5506b096fa1228d86cbd463c12e49
MD5 1e1996facf82d5b290425f371978a41a
BLAKE2b-256 a3f1c92385ded40ae7d7e1e166b911d662d7b16876207bdcb4cca1ced74432d6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pape_docs-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b87fc999ec4575bd55c36e0f640c28e6e9c980e95f34e119d72d6a0225e04cbf
MD5 7f3a5ce6865825a0af0cd7d76a7f6a1e
BLAKE2b-256 a7d7b915ff005bc1fada87b4b728495af5305ae997b4d42025a5044bf6f797ba

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