Skip to main content

A tool for ensuring your strucuredText files are (more) syntactically correct

Project description

rstbuddy

A Python command-line tool for working with reStructuredText (RST) files. Provides comprehensive link validation, RST file cleaning and fixing, and optional AI-powered summarization capabilities.

Related packages

  • restructuredtext-lint: This seems to be for when you want to write your README in RestructuredText, and want to ensure that PyPI will process it properly for you without errors. So it has a bunch of thing in it that we don't need for uploading to readthedocs, but definitely check it out. Note that it is a linter, not a fixer like this package is.

Core Features

RST Link Checking

  • External HTTP(S) links with concurrent checking and robots.txt support
  • Sphinx cross-references (:ref:, :doc:)
  • Directive paths (include, literalinclude, download, image, figure, thumbnail)
  • Smart scanning that ignores code blocks while preserving admonitions

RST File Cleaning & Fixing

  • Markdown to RST conversion (headings, code blocks, inline code)
  • Heading normalization and list spacing fixes
  • Code block and directive formatting
  • Stray Markdown fence removal

AI-Powered Summarization (Optional)

  • RST to Markdown conversion using Pandoc
  • AI summary generation with OpenAI API
  • Requires OpenAI API key configuration

Quick Start

Requirements

  • Python 3.11 or later
  • Pandoc (optional, for AI summarization)
  • OpenAI API key (optional, for AI summarization)

Installation

# Install
pip install rstbuddy

# With uv
uv tool -p 3.13 install rstbuddy

Usage

# Check all links in default doc/source directory
rstbuddy check-links

# Fix formatting issues in an RST file
rstbuddy fix document.rst

# Generate AI summary (requires OpenAI API key)
rstbuddy summarize document.rst

# Show help
rstbuddy --help

Commands

  • check-links: Validate external URLs, internal references, and file paths
  • fix: Clean and fix RST formatting issues, convert Markdown constructs
  • summarize: Generate AI-powered summaries (requires OpenAI API key)
  • settings: Display current configuration settings
  • version: Display version info for important packages used by rstbuddy (for bug reports)

Common Use Cases

  • Documentation Maintenance: Validate links and fix formatting before publishing
  • Quality Assurance: Check for broken references and maintain consistent RST formatting
  • Content Migration: Convert Markdown to RST and fix common formatting issues

Documentation

For detailed usage, configuration, and troubleshooting, see the full documentation.

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

rstbuddy-0.3.1.tar.gz (75.9 kB view details)

Uploaded Source

Built Distribution

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

rstbuddy-0.3.1-py3-none-any.whl (161.6 kB view details)

Uploaded Python 3

File details

Details for the file rstbuddy-0.3.1.tar.gz.

File metadata

  • Download URL: rstbuddy-0.3.1.tar.gz
  • Upload date:
  • Size: 75.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for rstbuddy-0.3.1.tar.gz
Algorithm Hash digest
SHA256 8caf4a3d875aa8508a157612f8a0df99b9f442102f77964a254b69158c58ef6b
MD5 17ef4cb1fabf563424d924c881128100
BLAKE2b-256 7f3e17d25e43a94b3321c68dc7693252f8a4a5d36c0b963a356b8bf0fdc490ee

See more details on using hashes here.

File details

Details for the file rstbuddy-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: rstbuddy-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 161.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.10

File hashes

Hashes for rstbuddy-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf4bb9d3464b63465162e77dc612ce81a60b8ad61fc59b8b664b98857c42ccf9
MD5 bb2804bceeb052daea9acb8cf9b02507
BLAKE2b-256 80820cb01565a01f5e06a3e121cb8c7779dbf9472d1b534b8d0d99fb1bd43ede

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