Refactor into integrated Python package structure
Architecture Changes: - Created src/seo/ package with modular architecture - Main application class (SEOApp) with Rails-inspired API - Separated concerns into distinct modules: - app.py: Main application orchestrator - cli.py: Command-line interface - config.py: Configuration management - exporter.py: Post export functionality - analyzer.py: AI analysis - recategorizer.py: Recategorization - seo_checker.py: SEO quality checking - categories.py: Category management - approval.py: User approval system New Features: - Proper Python package structure (src layout) - setup.py and setup.cfg for installation - Can be installed with: pip install -e . - Entry point: seo = seo.cli:main - Cleaner imports and dependencies Benefits: - Better code organization - Easier to maintain and extend - Follows Python best practices - Proper package isolation - Can be imported as library - Testable components - Clear separation of concerns Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
36
README.md
36
README.md
@@ -193,23 +193,39 @@ The SEO automation tool provides a simple, intuitive CLI inspired by Ruby on Rai
|
||||
|
||||
```
|
||||
seo/
|
||||
├── seo # Main CLI application (executable)
|
||||
├── scripts/
|
||||
│ ├── config.py # Configuration loader
|
||||
│ ├── export_posts_for_ai_decision.py
|
||||
│ ├── ai_analyze_posts_for_decisions.py
|
||||
│ ├── multi_site_seo_analyzer.py
|
||||
│ ├── category_manager.py # Category management
|
||||
│ ├── user_approval.py # Approval system
|
||||
│ └── ...
|
||||
├── seo # Main CLI executable
|
||||
├── src/seo/ # Integrated application package
|
||||
│ ├── __init__.py # Package initialization
|
||||
│ ├── cli.py # Command-line interface
|
||||
│ ├── app.py # Main application class
|
||||
│ ├── config.py # Configuration management
|
||||
│ ├── exporter.py # Post export functionality
|
||||
│ ├── analyzer.py # AI analysis functionality
|
||||
│ ├── recategorizer.py # Recategorization functionality
|
||||
│ ├── seo_checker.py # SEO quality checking
|
||||
│ ├── categories.py # Category management
|
||||
│ └── approval.py # User approval system
|
||||
├── scripts/ # Legacy scripts (deprecated)
|
||||
├── config.yaml # YAML configuration
|
||||
├── .env # Environment variables
|
||||
├── .env.example # Template
|
||||
├── requirements.txt # Dependencies
|
||||
├── output/reports/ # Generated CSV files
|
||||
├── output/ # Generated files
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
For development/installation:
|
||||
|
||||
```bash
|
||||
# Install in development mode
|
||||
pip install -e .
|
||||
|
||||
# Or just use the executable directly
|
||||
./seo help
|
||||
```
|
||||
|
||||
## 🎯 Typical Workflow
|
||||
|
||||
1. **Export posts** from all sites:
|
||||
|
||||
Reference in New Issue
Block a user