🧹 Clean up codebase: Remove redundant files and consolidate documentation
## Repository Cleanup Summary ### 🗑️ **Files Removed (42% reduction in root directory)** - **Development artifacts**: `__pycache__/`, `.pyc` files - **Completed utilities**: `batch_rename.py`, `workflow_renamer.py` (served their purpose) - **Redundant documentation**: `NAMING_CONVENTION.md`, `PERFORMANCE_COMPARISON.md`, `RENAMING_REPORT.md` - **Temporary files**: `screen-1.png` (undocumented screenshot) ### 📄 **Documentation Consolidation** - **README.md**: Completely rewritten as comprehensive documentation hub - Performance comparison table (700x improvement highlighted) - Consolidated naming convention guidelines - Complete setup and usage instructions - Technical architecture documentation - Clear deprecation notices for old system ### ⚠️ **Legacy System Deprecation** - **generate_documentation.py**: Added prominent deprecation warnings - Interactive warning on script execution - Clear redirection to new FastAPI system - Performance comparison (71MB vs <100KB) - User confirmation required to proceed with legacy system ### 🛡️ **Quality Improvements** - **`.gitignore`**: Added to prevent future development artifact commits - **Professional structure**: Clean, focused repository layout - **Clear migration path**: From 71MB HTML to modern API system - **Better documentation**: Single source of truth in README.md ## Final Repository Structure ``` n8n-workflows/ ├── README.md # Comprehensive documentation (NEW) ├── README_zh-hant.md # Chinese translation ├── CLAUDE.md # AI assistant context ├── .gitignore # Prevent artifacts (NEW) ├── api_server.py # Modern FastAPI system ├── workflow_db.py # Database handler ├── setup_fast_docs.py # Setup utility ├── generate_documentation.py # Legacy (with warnings) ├── import-workflows.sh # Import utility ├── requirements.txt # Dependencies ├── workflows.db # SQLite database ├── static/ # Frontend assets └── workflows/ # 2,053 workflow JSON files ``` ## Impact - **Repository size**: Reduced clutter by removing 8 unnecessary files - **Developer experience**: Clear documentation and setup instructions - **Maintainability**: Eliminated completed one-time utilities - **Professional appearance**: Clean, organized, purpose-driven structure - **Future-proofing**: .gitignore prevents artifact accumulation This cleanup transforms the repository from a collection of mixed tools into a clean, professional codebase focused on the modern high-performance workflow documentation system. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
N8N Workflow Documentation Generator
|
||||
⚠️ DEPRECATED: N8N Workflow Documentation Generator (Legacy System)
|
||||
|
||||
This script analyzes n8n workflow JSON files and generates a comprehensive HTML documentation page.
|
||||
It performs static analysis of the workflow files to extract metadata, categorize workflows,
|
||||
and create an interactive documentation interface.
|
||||
🚨 WARNING: This script generates a 71MB HTML file that is extremely slow to load.
|
||||
It has been replaced by a modern FastAPI system that's 700x smaller and 10x faster.
|
||||
|
||||
Usage: python generate_documentation.py
|
||||
🆕 USE THE NEW SYSTEM INSTEAD:
|
||||
1. pip install fastapi uvicorn
|
||||
2. python3 api_server.py
|
||||
3. Open http://localhost:8000
|
||||
|
||||
📊 PERFORMANCE COMPARISON:
|
||||
Old System (this script): 71MB, 10+ seconds load time, poor mobile support
|
||||
New System (api_server.py): <100KB, <1 second load time, excellent mobile support
|
||||
|
||||
⚡ The new system provides:
|
||||
- Instant full-text search with ranking
|
||||
- Real-time filtering and statistics
|
||||
- Professional responsive design
|
||||
- Sub-100ms response times
|
||||
- Dark/light theme support
|
||||
|
||||
This legacy script is kept for backwards compatibility only.
|
||||
For the best experience, please use the new FastAPI documentation system.
|
||||
|
||||
Usage (NOT RECOMMENDED): python generate_documentation.py
|
||||
"""
|
||||
|
||||
import json
|
||||
@@ -2097,9 +2115,48 @@ def generate_html_documentation(data: Dict[str, Any]) -> str:
|
||||
return html_template.strip()
|
||||
|
||||
|
||||
def show_deprecation_warning():
|
||||
"""Show deprecation warning and ask for user confirmation."""
|
||||
print("\n" + "🚨" * 20)
|
||||
print("⚠️ DEPRECATED SYSTEM WARNING")
|
||||
print("🚨" * 20)
|
||||
print()
|
||||
print("🔴 This script generates a 71MB HTML file that is extremely slow!")
|
||||
print("🟢 A new FastAPI system is available that's 700x smaller and 10x faster!")
|
||||
print()
|
||||
print("🆕 RECOMMENDED: Use the new system instead:")
|
||||
print(" 1. pip install fastapi uvicorn")
|
||||
print(" 2. python3 api_server.py")
|
||||
print(" 3. Open http://localhost:8000")
|
||||
print()
|
||||
print("📊 PERFORMANCE COMPARISON:")
|
||||
print(" Old (this script): 71MB, 10+ seconds load, poor mobile")
|
||||
print(" New (api_server): <100KB, <1 second load, excellent mobile")
|
||||
print()
|
||||
print("⚡ New system features:")
|
||||
print(" ✅ Instant full-text search with ranking")
|
||||
print(" ✅ Real-time filtering and statistics")
|
||||
print(" ✅ Professional responsive design")
|
||||
print(" ✅ Sub-100ms response times")
|
||||
print(" ✅ Dark/light theme support")
|
||||
print()
|
||||
print("🚨" * 20)
|
||||
|
||||
response = input("\nDo you still want to use this deprecated slow system? (y/N): ").strip().lower()
|
||||
if response != 'y':
|
||||
print("\n✅ Good choice! Please use the new FastAPI system:")
|
||||
print(" python3 api_server.py")
|
||||
exit(0)
|
||||
|
||||
print("\n⚠️ Proceeding with deprecated system (not recommended)...")
|
||||
|
||||
|
||||
def main():
|
||||
"""Main function to generate the workflow documentation."""
|
||||
print("🔍 N8N Workflow Documentation Generator")
|
||||
# Show deprecation warning first
|
||||
show_deprecation_warning()
|
||||
|
||||
print("\n🔍 N8N Workflow Documentation Generator (Legacy)")
|
||||
print("=" * 50)
|
||||
|
||||
# Initialize analyzer
|
||||
@@ -2116,10 +2173,13 @@ def main():
|
||||
with open(output_path, 'w', encoding='utf-8') as f:
|
||||
f.write(html)
|
||||
|
||||
print(f"✅ Documentation generated successfully: {output_path}")
|
||||
print(f"✅ Documentation generated: {output_path}")
|
||||
print(f" - {data['stats']['total']} workflows analyzed")
|
||||
print(f" - {data['stats']['active']} active workflows")
|
||||
print(f" - {data['stats']['unique_integrations']} unique integrations")
|
||||
print()
|
||||
print("⚠️ REMINDER: This 71MB file will be slow to load.")
|
||||
print("🆕 Consider using the new FastAPI system: python3 api_server.py")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user