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.
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 pathsfix: Clean and fix RST formatting issues, convert Markdown constructssummarize: Generate AI-powered summaries (requires OpenAI API key)settings: Display current configuration settingsversion: Display version info for important packages used byrstbuddy(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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rstbuddy-0.2.0.tar.gz.
File metadata
- Download URL: rstbuddy-0.2.0.tar.gz
- Upload date:
- Size: 62.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c9799fd7adfdca7f71a6101053542593e387cf2d02cf46c6e38019fc9577af4
|
|
| MD5 |
b7c94c79f2871ba176d63ecdf674137a
|
|
| BLAKE2b-256 |
82dc2c5b45bc13304a47590f54284e899cba8eb23bfd5996936883eb466a5207
|
File details
Details for the file rstbuddy-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rstbuddy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 69.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0284dbce9c5b339d935ba294779515cd19ac42ec13fd4793b91ec4d691f103df
|
|
| MD5 |
403ba18b9406159ad313b3fd00494d24
|
|
| BLAKE2b-256 |
63f485f707e48703d8e165961d94c1c553e093117a5928571bcc56fb1a2d9e3a
|