Aditi (Sanskrit: आदिति, "boundless") - A CLI tool that prepares AsciiDoc files for seamless migration to DITA.
Aditi helps technical writers identify and fix compatibility issues when migrating from AsciiDoc to DITA. It uses the Vale linter with comprehensive AsciiDocDITA rules to categorize issues as automatically fixable, partially fixable, or requiring manual review.
- 🔍 Comprehensive Analysis: Detects all 27 AsciiDocDITA compatibility issues
- 🔧 Smart Auto-Fixing: Automatically resolves deterministic issues (entities, content types)
- 📊 Intelligent Categorization: Sorts issues by fix complexity and priority
- 🚀 Performance Optimized: Parallel processing with container resource limits
- 🛡️ Production Ready: Robust error handling and graceful interruption support
- 📋 Clear Reporting: Visual progress indicators and actionable results
pip install --upgrade aditiNote: If you encounter an installation error like
[Errno 20] Not a directory: '/home/user/.local/bin/typer', see the troubleshooting guide.
- Python: 3.11 or later
- Container Runtime: Podman (preferred) or Docker
- Platform: Linux, macOS, Windows (with WSL2)
aditi --helpAditi will automatically pull the Vale container image on first use. To pre-download:
# For Podman (default)
podman pull docker.io/jdkato/vale:latest
# For Docker
docker pull docker.io/jdkato/vale:latestcd /path/to/your/asciidoc-project
aditi initWhat this does:
- Downloads Vale container image
- Installs AsciiDocDITA rules
- Creates
.vale.iniconfiguration - Sets up project for analysis
# Interactive mode (default)
aditi journey
# Process specific files directly
aditi journey docs/guide.adoc docs/reference.adoc
# Process entire directories
aditi journey docs/ examples/
# Mix files and directories
aditi journey README.adoc docs/ examples/user-guide.adocFeatures:
- Interactive directory selection when no paths provided
- Direct file/directory processing when paths specified
- Configure repository permissions
- Set working preferences
- Session continuity for interrupted workflows
# Check all configured files
aditi check
# Check specific files/directories
aditi check docs/ user-guide.adoc
# Focus on specific issues
aditi check --rule ContentType --verbose# Preview changes (recommended first step)
aditi fix --dry-run
# Apply fixes interactively
aditi fix
# Apply fixes automatically (CI/CD)
aditi fix --non-interactive# Start fresh project
mkdir my-dita-migration && cd my-dita-migration
# Install and initialize
pip install --upgrade aditi
aditi init
# Set up paths (follow prompts)
aditi journey
# Analyze current state
aditi check --verbose
# Fix obvious problems first
aditi fix --rule EntityReference # Fix character entities
aditi fix --rule ContentType # Add missing content types
# Review remaining issues
aditi check
# Apply additional fixes as needed
aditi fix --dry-run # Preview all remaining fixes
aditi fix # Apply interactively| Resource | Description |
|---|---|
| Quick Start Guide | Get up and running in under 5 minutes |
| Full Documentation | Complete reference with examples |
| Example Files | Sample AsciiDoc files demonstrating each rule |
| Troubleshooting | Common issues and solutions |
Aditi implements all 27 AsciiDocDITA rules with intelligent categorization:
- EntityReference: Replaces unsupported character entities
- ContentType: Adds missing content type attributes with placeholders
- Structure Rules: NestedSection, TaskSection, ExampleBlock
- Content Rules: AdmonitionTitle, AuthorLine, BlockTitle
- Format Rules: DiscreteHeading, ThematicBreak, PageBreak
- Reference Rules: CrossReference, LinkAttribute, IncludeDirective
- And 18 more covering all DITA compatibility concerns
- Interactive Journey: The
aditi journeycommand requires interactive input - Container Dependency: Requires Podman or Docker for Vale execution
- Path Restrictions: Files must be within configured allowed directories
- Large Files: Processing very large files (>10MB) may be slower
- Windows: Best experience on Linux/macOS; Windows requires WSL2
- Non-interactive mode for
journeycommand (CI/CD support) - Direct DITA output generation
- Custom rule configuration
- Integration with popular documentation platforms
- Batch processing optimizations for large repositories
To contribute to Aditi:
# Clone the repository
git clone https://github.com/rolfedh/aditi.git
cd aditi
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
ruff check .
mypy .This project is licensed under the MIT License - see the LICENSE file for details.
- Built on the Vale linter
- Uses AsciiDocDITA rules by Jaromir Hradilek
- Powered by Typer and Rich