Files
seo/CHANGELOG.md
Kevin Bataille 8c7cd24685 Refactor SEO automation into unified CLI application
Major refactoring to create a clean, integrated CLI application:

### New Features:
- Unified CLI executable (./seo) with simple command structure
- All commands accept optional CSV file arguments
- Auto-detection of latest files when no arguments provided
- Simplified output directory structure (output/ instead of output/reports/)
- Cleaner export filename format (all_posts_YYYY-MM-DD.csv)

### Commands:
- export: Export all posts from WordPress sites
- analyze [csv]: Analyze posts with AI (optional CSV input)
- recategorize [csv]: Recategorize posts with AI
- seo_check: Check SEO quality
- categories: Manage categories across sites
- approve [files]: Review and approve recommendations
- full_pipeline: Run complete workflow
- analytics, gaps, opportunities, report, status

### Changes:
- Moved all scripts to scripts/ directory
- Created config.yaml for configuration
- Updated all scripts to use output/ directory
- Deprecated old seo-cli.py in favor of new ./seo
- Added AGENTS.md and CHANGELOG.md documentation
- Consolidated README.md with updated usage

### Technical:
- Added PyYAML dependency
- Removed hardcoded configuration values
- All scripts now properly integrated
- Better error handling and user feedback

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-16 14:24:44 +01:00

3.4 KiB

Changelog

[Unreleased]

Changed

  • Output directory structure: Removed output/reports/ subdirectory, all files now go directly to output/

    • Simpler directory structure
    • Easier to find and manage files
    • All CSV files in one location
  • Export filename format: Changed from all_posts_for_ai_decision_YYYYMMDD_HHMMSS.csv to all_posts_YYYY-MM-DD.csv

    • Simpler, cleaner naming convention
    • ISO 8601 date format (YYYY-MM-DD)
    • One file per day (overwrites previous exports on same day)
  • CLI commands now accept CSV file arguments: All analysis commands can take optional CSV file inputs

    • seo analyze [csv_file] - Analyze specific CSV or latest export
    • seo recategorize [csv_file] - Recategorize specific CSV or latest export
    • seo approve [file1.csv] [file2.csv] ... - Approve specific recommendation files
    • Auto-detects latest files if no arguments provided

Added

  • Unified CLI application: New ./seo executable with simple command structure
    • Inspired by Ruby on Rails CLI conventions
    • Simple, memorable command names
    • Comprehensive help system
    • Optional CSV file arguments for all analysis commands

Deprecated

  • scripts/seo-cli.py: Old CLI tool, use ./seo instead
    • Still functional but will be removed in future versions
    • All functionality available in new CLI
  • output/reports/: Subdirectory removed, use output/ directly

Commands

New CLI (./seo)

./seo help                              # Show available commands
./seo export                            # Export all posts (creates output/all_posts_YYYY-MM-DD.csv)
./seo analyze [csv_file]                # Analyze posts with AI (optional CSV input)
./seo recategorize [csv_file]           # Recategorize posts (optional CSV input)
./seo seo_check                         # Check SEO quality
./seo categories                        # Manage categories
./seo approve [file1.csv] [file2.csv]   # Approve recommendations (optional CSV inputs)
./seo full_pipeline                     # Run complete workflow
./seo analytics ga4.csv gsc.csv         # Import analytics
./seo gaps                              # Analyze content gaps
./seo opportunities                     # Analyze keyword opportunities
./seo report                            # Generate reports
./seo status                            # Show output files

File Naming

  • Old: all_posts_for_ai_decision_20260216_141512.csv
  • New: all_posts_2026-02-16.csv

Directory Structure

  • Old: output/reports/all_posts_*.csv
  • New: output/all_posts_*.csv

Benefits:

  • Cleaner, more readable filenames
  • Simpler directory structure
  • ISO 8601 date format (YYYY-MM-DD)
  • Easier to identify recent exports
  • Consistent with modern CLI conventions
  • Flexible CSV file arguments for all commands

Examples

Export and analyze

# Export posts
./seo export
# Creates: output/all_posts_2026-02-16.csv

# Analyze (uses latest export automatically)
./seo analyze

# Or specify a specific file
./seo analyze output/all_posts_2026-02-16.csv

Approve recommendations

# Auto-detect recommendation files
./seo approve

# Or specify specific files
./seo approve output/category_assignments_*.csv output/posts_to_move_*.csv

Full workflow

# Complete pipeline with one command
./seo full_pipeline

# Or step by step with control
./seo export
./seo analyze
./seo categories
./seo approve