- Complete WCAG 2.1 accessibility checking system
- AI-powered analysis with Claude 4.5 and Google Vision
- Web interface with drag-and-drop upload
- REST API backend (PHP)
- Python checker with parallel processing
- Quick mode for fast scans (~10 seconds)
- Full mode with AI analysis (~2 minutes)
- .env file support for API keys
- Error logging and debugging tools
- Comprehensive documentation
Performance improvements:
- Parallel image processing (3x faster)
- Smart API timeouts (10s)
- Reduced DPI for faster conversions
- Real-time progress updates
🤖 Generated with Claude Code
118 lines
3 KiB
Bash
118 lines
3 KiB
Bash
#!/bin/bash
|
|
# Enterprise PDF Accessibility Checker - Installation Script
|
|
|
|
set -e
|
|
|
|
echo "=========================================="
|
|
echo "Enterprise PDF Accessibility Checker"
|
|
echo "Installation Script"
|
|
echo "=========================================="
|
|
echo ""
|
|
|
|
# Check if running as root
|
|
if [ "$EUID" -eq 0 ]; then
|
|
echo "Please do not run as root/sudo"
|
|
exit 1
|
|
fi
|
|
|
|
# Detect OS
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
OS="linux"
|
|
PKG_MGR="apt-get"
|
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
OS="mac"
|
|
PKG_MGR="brew"
|
|
else
|
|
echo "Unsupported OS: $OSTYPE"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Detected OS: $OS"
|
|
echo ""
|
|
|
|
# Step 1: Install system dependencies
|
|
echo "Step 1: Installing system dependencies..."
|
|
if [ "$OS" == "linux" ]; then
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
python3 \
|
|
python3-pip \
|
|
tesseract-ocr \
|
|
poppler-utils \
|
|
php \
|
|
php-cli \
|
|
php-json
|
|
elif [ "$OS" == "mac" ]; then
|
|
brew install python3 tesseract poppler php
|
|
fi
|
|
echo "✓ System dependencies installed"
|
|
echo ""
|
|
|
|
# Step 2: Install Python dependencies
|
|
echo "Step 2: Installing Python dependencies..."
|
|
pip3 install -r requirements.txt --break-system-packages || pip3 install -r requirements.txt
|
|
echo "✓ Python dependencies installed"
|
|
echo ""
|
|
|
|
# Step 3: Download TextBlob corpora
|
|
echo "Step 3: Downloading TextBlob language data..."
|
|
python3 -m textblob.download_corpora lite
|
|
echo "✓ TextBlob corpora downloaded"
|
|
echo ""
|
|
|
|
# Step 4: Create required directories
|
|
echo "Step 4: Creating directories..."
|
|
mkdir -p uploads results .cache
|
|
chmod 755 uploads results .cache
|
|
echo "✓ Directories created"
|
|
echo ""
|
|
|
|
# Step 5: Test installation
|
|
echo "Step 5: Testing installation..."
|
|
python3 enterprise_pdf_checker.py --help > /dev/null 2>&1
|
|
if [ $? -eq 0 ]; then
|
|
echo "✓ Installation successful!"
|
|
else
|
|
echo "⚠ Warning: Python script test failed"
|
|
fi
|
|
echo ""
|
|
|
|
# Step 6: Check for API keys
|
|
echo "Step 6: Checking API configuration..."
|
|
if [ -z "$ANTHROPIC_API_KEY" ]; then
|
|
echo "⚠ ANTHROPIC_API_KEY not set"
|
|
echo " Export it with: export ANTHROPIC_API_KEY='sk-ant-...'"
|
|
else
|
|
echo "✓ Anthropic API key found"
|
|
fi
|
|
|
|
if [ -z "$GOOGLE_APPLICATION_CREDENTIALS" ]; then
|
|
echo "⚠ GOOGLE_APPLICATION_CREDENTIALS not set"
|
|
echo " Export it with: export GOOGLE_APPLICATION_CREDENTIALS='/path/to/creds.json'"
|
|
else
|
|
echo "✓ Google credentials found"
|
|
fi
|
|
echo ""
|
|
|
|
# Final instructions
|
|
echo "=========================================="
|
|
echo "Installation Complete!"
|
|
echo "=========================================="
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo ""
|
|
echo "1. Configure API keys (if not already done):"
|
|
echo " export ANTHROPIC_API_KEY='sk-ant-...'"
|
|
echo " export GOOGLE_APPLICATION_CREDENTIALS='/path/to/creds.json'"
|
|
echo ""
|
|
echo "2. Start the web server:"
|
|
echo " php -S localhost:8000"
|
|
echo ""
|
|
echo "3. Open in browser:"
|
|
echo " http://localhost:8000"
|
|
echo ""
|
|
echo "Or use the command line:"
|
|
echo " python3 enterprise_pdf_checker.py your_document.pdf"
|
|
echo ""
|
|
echo "See ENTERPRISE_README.md for detailed documentation."
|
|
echo ""
|