diff --git a/BACKLOG_STATUS.md b/BACKLOG_STATUS.md index 2e4513c..e6f75b4 100644 --- a/BACKLOG_STATUS.md +++ b/BACKLOG_STATUS.md @@ -1,4 +1,4 @@ -# HVAC Know It All - Production Backlog Capture Status +# HKIA - Production Backlog Capture Status ## šŸ“Š Current Progress Report **Last Updated**: August 18, 2025 @ 10:23 PM ADT @@ -30,9 +30,9 @@ All markdown files are being created in specification-compliant format: ``` /home/ben/dev/hvac-kia-content/data_production_backlog/markdown_current/ -ā”œā”€ā”€ hvacknowitall_wordpress_backlog_20250818_221430.md (1.5M) -ā”œā”€ā”€ hvacknowitall_podcast_backlog_20250818_221531.md (727K) -└── hvacknowitall_youtube_backlog_20250818_221604.md (107K) +ā”œā”€ā”€ hkia_wordpress_backlog_20250818_221430.md (1.5M) +ā”œā”€ā”€ hkia_podcast_backlog_20250818_221531.md (727K) +└── hkia_youtube_backlog_20250818_221604.md (107K) ``` ### āœ… Format Verification @@ -40,7 +40,7 @@ All markdown files are being created in specification-compliant format: - Correct markdown structure with `##` headers - Full content including descriptions and metadata - Item separators (`--------------------------------------------------`) -- Timestamped filenames: `hvacknowitall_[source]_backlog_[timestamp].md` +- Timestamped filenames: `hkia_[source]_backlog_[timestamp].md` ## šŸ“Š Statistics diff --git a/CLAUDE.md b/CLAUDE.md index 0a11af8..5855426 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,7 +27,7 @@ Complete content aggregation system that scrapes 6 sources (WordPress, MailChimp ### YouTube Scraper (`src/youtube_scraper.py`) - Uses `yt-dlp` for metadata extraction -- Channel: `@HVACKnowItAll` +- Channel: `@hkia` - Fetches video metadata without downloading videos ### RSS Scrapers @@ -56,10 +56,10 @@ Originally planned for Kubernetes deployment but **TikTok requires headed browse ### Production Setup ```bash # Service files location -/etc/systemd/system/hvac-scraper.service -/etc/systemd/system/hvac-scraper.timer -/etc/systemd/system/hvac-scraper-nas.service -/etc/systemd/system/hvac-scraper-nas.timer +/etc/systemd/system/hkia-scraper.service +/etc/systemd/system/hkia-scraper.timer +/etc/systemd/system/hkia-scraper-nas.service +/etc/systemd/system/hkia-scraper-nas.timer # Installation directory /opt/hvac-kia-content/ @@ -79,7 +79,7 @@ export XAUTHORITY="/run/user/1000/.mutter-Xwaylandauth.90WDB3" # Required in /opt/hvac-kia-content/.env INSTAGRAM_USERNAME=hkia1 INSTAGRAM_PASSWORD=I22W5YlbRl7x -YOUTUBE_CHANNEL=@HVACKnowItAll +YOUTUBE_CHANNEL=@hkia TIKTOK_USERNAME=hkia NAS_PATH=/mnt/nas/hkia TIMEZONE=America/Halifax @@ -113,8 +113,8 @@ uv run python -m src.orchestrator --sources youtube instagram uv run python -m src.orchestrator --nas-only # Check service status -sudo systemctl status hvac-scraper.service -sudo journalctl -f -u hvac-scraper.service +sudo systemctl status hkia-scraper.service +sudo journalctl -f -u hkia-scraper.service ``` ## Critical Notes diff --git a/DEPLOY.md b/DEPLOY.md index c0b4029..d1528f6 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -33,12 +33,12 @@ sudo cp deploy/*.timer /etc/systemd/system/ sudo systemctl daemon-reload # Enable timers (start on boot) -sudo systemctl enable hvac-content-8am.timer -sudo systemctl enable hvac-content-12pm.timer +sudo systemctl enable hkia-content-8am.timer +sudo systemctl enable hkia-content-12pm.timer # Start timers immediately -sudo systemctl start hvac-content-8am.timer -sudo systemctl start hvac-content-12pm.timer +sudo systemctl start hkia-content-8am.timer +sudo systemctl start hkia-content-12pm.timer ``` ## Verify Deployment @@ -51,8 +51,8 @@ systemctl list-timers | grep hvac Expected output: ``` NEXT LEFT LAST PASSED UNIT ACTIVATES -Mon 2025-08-20 08:00:00 ADT 21h left n/a n/a hvac-content-8am.timer hvac-content-8am.service -Mon 2025-08-19 12:00:00 ADT 1h 9min left n/a n/a hvac-content-12pm.timer hvac-content-12pm.service +Mon 2025-08-20 08:00:00 ADT 21h left n/a n/a hkia-content-8am.timer hkia-content-8am.service +Mon 2025-08-19 12:00:00 ADT 1h 9min left n/a n/a hkia-content-12pm.timer hkia-content-12pm.service ``` ## Monitor Services @@ -60,13 +60,13 @@ Mon 2025-08-19 12:00:00 ADT 1h 9min left n/a n/a hvac-content-12pm.timer View logs in real-time: ```bash # Morning run logs -journalctl -u hvac-content-8am -f +journalctl -u hkia-content-8am -f # Noon run logs -journalctl -u hvac-content-12pm -f +journalctl -u hkia-content-12pm -f # All logs -journalctl -u hvac-content-* -f +journalctl -u hkia-content-* -f ``` ## Manual Testing @@ -74,10 +74,10 @@ journalctl -u hvac-content-* -f Run the service manually: ```bash # Test morning run -sudo systemctl start hvac-content-8am.service +sudo systemctl start hkia-content-8am.service # Check status -sudo systemctl status hvac-content-8am.service +sudo systemctl status hkia-content-8am.service ``` ## Stop/Disable Services @@ -85,30 +85,30 @@ sudo systemctl status hvac-content-8am.service If needed: ```bash # Stop timers -sudo systemctl stop hvac-content-8am.timer -sudo systemctl stop hvac-content-12pm.timer +sudo systemctl stop hkia-content-8am.timer +sudo systemctl stop hkia-content-12pm.timer # Disable from starting on boot -sudo systemctl disable hvac-content-8am.timer -sudo systemctl disable hvac-content-12pm.timer +sudo systemctl disable hkia-content-8am.timer +sudo systemctl disable hkia-content-12pm.timer ``` ## Troubleshooting ### Service Fails to Start -1. Check logs: `journalctl -u hvac-content-8am -n 50` +1. Check logs: `journalctl -u hkia-content-8am -n 50` 2. Verify paths in service files 3. Check Python environment: `source .venv/bin/activate && python --version` 4. Test manual run: `cd /home/ben/dev/hvac-kia-content && uv run python run_api_production_v2.py` ### Permission Issues - Ensure user `ben` has read/write access to data directories -- Check NAS mount permissions: `ls -la /mnt/nas/hvacknowitall/` +- Check NAS mount permissions: `ls -la /mnt/nas/hkia/` ### Timer Not Triggering -- Check timer status: `systemctl status hvac-content-8am.timer` +- Check timer status: `systemctl status hkia-content-8am.timer` - Verify system time: `timedatectl` -- Check timer schedule: `systemctl cat hvac-content-8am.timer` +- Check timer schedule: `systemctl cat hkia-content-8am.timer` ## Schedule @@ -121,4 +121,4 @@ Both runs will: 2. Merge with existing cumulative files 3. Update metrics and add captions where available 4. Archive previous versions -5. Sync to NAS at `/mnt/nas/hvacknowitall/` \ No newline at end of file +5. Sync to NAS at `/mnt/nas/hkia/` \ No newline at end of file diff --git a/FINAL_TALLY_REPORT.md b/FINAL_TALLY_REPORT.md index 764c4ee..e839669 100644 --- a/FINAL_TALLY_REPORT.md +++ b/FINAL_TALLY_REPORT.md @@ -1,4 +1,4 @@ -# HVAC Know It All - Production Backlog Capture Tally Report +# HKIA - Production Backlog Capture Tally Report **Generated**: August 18, 2025 @ 11:00 PM ADT ## āœ… Markdown Creation Verification @@ -7,9 +7,9 @@ All completed sources have been successfully saved to specification-compliant ma | Source | Status | Markdown File | Items | File Size | Verification | |--------|--------|---------------|-------|-----------|--------------| -| **WordPress** | āœ… Complete | hvacknowitall_wordpress_backlog_20250818_221430.md | 139 posts | 1.5 MB | āœ… Verified | -| **Podcast** | āœ… Complete | hvacknowitall_podcast_backlog_20250818_221531.md | 428 episodes | 727 KB | āœ… Verified | -| **YouTube** | āœ… Complete | hvacknowitall_youtube_backlog_20250818_221604.md | 200 videos | 107 KB | āœ… Verified | +| **WordPress** | āœ… Complete | hkia_wordpress_backlog_20250818_221430.md | 139 posts | 1.5 MB | āœ… Verified | +| **Podcast** | āœ… Complete | hkia_podcast_backlog_20250818_221531.md | 428 episodes | 727 KB | āœ… Verified | +| **YouTube** | āœ… Complete | hkia_youtube_backlog_20250818_221604.md | 200 videos | 107 KB | āœ… Verified | | **MailChimp** | āš ļø SSL Error | N/A | 0 | N/A | Known Issue | | **Instagram** | šŸ”„ In Progress | Pending completion | 15/1000 | TBD | Processing | | **TikTok** | ā³ Queued | Pending | 0/1000 | TBD | Waiting | diff --git a/README.md b/README.md index 7a2dd39..6a2abe5 100644 --- a/README.md +++ b/README.md @@ -144,31 +144,31 @@ tests/ # Test files ### Systemd Services Services are configured in `/etc/systemd/system/`: -- `hvac-content-images-8am.service` - Morning run with image downloads -- `hvac-content-images-12pm.service` - Noon run with image downloads -- `hvac-content-images-8am.timer` - Morning schedule (8 AM Atlantic) -- `hvac-content-images-12pm.timer` - Noon schedule (12 PM Atlantic) +- `hkia-content-images-8am.service` - Morning run with image downloads +- `hkia-content-images-12pm.service` - Noon run with image downloads +- `hkia-content-images-8am.timer` - Morning schedule (8 AM Atlantic) +- `hkia-content-images-12pm.timer` - Noon schedule (12 PM Atlantic) ### Manual Deployment ```bash # Start services -sudo systemctl start hvac-content-8am.timer -sudo systemctl start hvac-content-12pm.timer +sudo systemctl start hkia-content-8am.timer +sudo systemctl start hkia-content-12pm.timer # Enable on boot -sudo systemctl enable hvac-content-8am.timer -sudo systemctl enable hvac-content-12pm.timer +sudo systemctl enable hkia-content-8am.timer +sudo systemctl enable hkia-content-12pm.timer # Check status -sudo systemctl status hvac-content-*.timer +sudo systemctl status hkia-content-*.timer ``` ## Monitoring ```bash # View logs -journalctl -u hvac-content-8am -f +journalctl -u hkia-content-8am -f # Check file growth ls -lh data/markdown_current/ diff --git a/UPDATED_CAPTURE_STATUS.md b/UPDATED_CAPTURE_STATUS.md index 45f26de..bd1610a 100644 --- a/UPDATED_CAPTURE_STATUS.md +++ b/UPDATED_CAPTURE_STATUS.md @@ -1,4 +1,4 @@ -# HVAC Know It All - Updated Production Backlog Capture +# HKIA - Updated Production Backlog Capture ## šŸš€ Updated Configuration **Started**: August 18, 2025 @ 10:54 PM ADT @@ -37,11 +37,11 @@ ## šŸ“ Output Location ``` /home/ben/dev/hvac-kia-content/data_production_backlog/markdown_current/ -ā”œā”€ā”€ hvacknowitall_wordpress_backlog_[timestamp].md -ā”œā”€ā”€ hvacknowitall_podcast_backlog_[timestamp].md -ā”œā”€ā”€ hvacknowitall_youtube_backlog_[timestamp].md -ā”œā”€ā”€ hvacknowitall_instagram_backlog_[timestamp].md (pending) -└── hvacknowitall_tiktok_backlog_[timestamp].md (pending) +ā”œā”€ā”€ hkia_wordpress_backlog_[timestamp].md +ā”œā”€ā”€ hkia_podcast_backlog_[timestamp].md +ā”œā”€ā”€ hkia_youtube_backlog_[timestamp].md +ā”œā”€ā”€ hkia_instagram_backlog_[timestamp].md (pending) +└── hkia_tiktok_backlog_[timestamp].md (pending) ``` ## šŸ“ˆ Progress Monitoring diff --git a/docs/DEPLOYMENT_CHECKLIST.md b/docs/DEPLOYMENT_CHECKLIST.md index 61115e1..6fd6684 100644 --- a/docs/DEPLOYMENT_CHECKLIST.md +++ b/docs/DEPLOYMENT_CHECKLIST.md @@ -59,7 +59,7 @@ - [ ] NAS mount point exists and is accessible - [ ] Write permissions verified: ```bash - touch /mnt/nas/hvacknowitall/test.txt && rm /mnt/nas/hvacknowitall/test.txt + touch /mnt/nas/hkia/test.txt && rm /mnt/nas/hkia/test.txt ``` - [ ] Sufficient space available on NAS @@ -136,15 +136,15 @@ ### 6. Enable Services - [ ] Enable main timer: ```bash - sudo systemctl enable hvac-content-aggregator.timer + sudo systemctl enable hkia-content-aggregator.timer ``` - [ ] Start timer: ```bash - sudo systemctl start hvac-content-aggregator.timer + sudo systemctl start hkia-content-aggregator.timer ``` - [ ] Verify timer is active: ```bash - systemctl status hvac-content-aggregator.timer + systemctl status hkia-content-aggregator.timer ``` ### 7. Optional: TikTok Captions @@ -163,7 +163,7 @@ ``` - [ ] No errors in service status: ```bash - systemctl status hvac-content-aggregator.service + systemctl status hkia-content-aggregator.service ``` - [ ] Log files being created: ```bash @@ -173,7 +173,7 @@ ### First Run Verification - [ ] Manually trigger first run: ```bash - sudo systemctl start hvac-content-aggregator.service + sudo systemctl start hkia-content-aggregator.service ``` - [ ] Monitor logs in real-time: ```bash @@ -241,7 +241,7 @@ - [ ] Check systemd timer status - [ ] Review journal logs: ```bash - journalctl -u hvac-content-aggregator.timer + journalctl -u hkia-content-aggregator.timer ``` ### If NAS Sync Fails @@ -255,7 +255,7 @@ ### Quick Rollback 1. [ ] Stop services: ```bash - sudo systemctl stop hvac-content-aggregator.timer + sudo systemctl stop hkia-content-aggregator.timer ``` 2. [ ] Restore previous version: ```bash @@ -264,7 +264,7 @@ ``` 3. [ ] Restart services: ```bash - sudo systemctl start hvac-content-aggregator.timer + sudo systemctl start hkia-content-aggregator.timer ``` ### Full Rollback diff --git a/docs/PRODUCTION_TODO.md b/docs/PRODUCTION_TODO.md index f0dfd6f..3272e24 100644 --- a/docs/PRODUCTION_TODO.md +++ b/docs/PRODUCTION_TODO.md @@ -1,7 +1,7 @@ # Production Readiness Todo List ## Overview -This document outlines all tasks required to meet the original specification and prepare the HVAC Know It All Content Aggregator for production deployment. Tasks are organized by priority and phase. +This document outlines all tasks required to meet the original specification and prepare the HKIA Content Aggregator for production deployment. Tasks are organized by priority and phase. **Note:** Docker/Kubernetes deployment is not feasible due to TikTok scraping requiring display server access. The system uses systemd for service management instead. @@ -26,7 +26,7 @@ This document outlines all tasks required to meet the original specification and ### File Organization - [ ] Fix file naming convention to match spec format - Change from: `update_20241218_060000.md` - - To: `hvacknowitall__2024-12-18-T060000.md` + - To: `hkia__2024-12-18-T060000.md` - [ ] Create proper directory structure ``` @@ -306,7 +306,7 @@ sed -i 's/18:00:00/12:00:00/g' systemd/*.timer # Phase 4: Test Deployment ./install_production.sh -systemctl status hvac-content-aggregator.timer +systemctl status hkia-content-aggregator.timer ``` --- diff --git a/docs/deployment_strategy.md b/docs/deployment_strategy.md index 466fa7e..d248bc1 100644 --- a/docs/deployment_strategy.md +++ b/docs/deployment_strategy.md @@ -1,4 +1,4 @@ -# HVAC Know It All - Deployment Strategy +# HKIA - Deployment Strategy ## Summary @@ -76,20 +76,20 @@ After thorough testing and implementation, the content aggregation system has be ā”œā”€ā”€ .env # Environment configuration ā”œā”€ā”€ requirements.txt # Python dependencies └── systemd/ # Service configuration - ā”œā”€ā”€ hvac-scraper.service - ā”œā”€ā”€ hvac-scraper-morning.timer - └── hvac-scraper-afternoon.timer + ā”œā”€ā”€ hkia-scraper.service + ā”œā”€ā”€ hkia-scraper-morning.timer + └── hkia-scraper-afternoon.timer ``` ## NAS Integration -**Sync to**: `/mnt/nas/hvacknowitall/` +**Sync to**: `/mnt/nas/hkia/` - Markdown files with timestamped archives - Organized by source and date - Incremental sync to minimize bandwidth ## Conclusion -While the original containerized approach is not viable due to TikTok's GUI requirements, the direct deployment approach provides a robust and maintainable solution for the HVAC Know It All content aggregation system. +While the original containerized approach is not viable due to TikTok's GUI requirements, the direct deployment approach provides a robust and maintainable solution for the HKIA content aggregation system. -The system successfully aggregates content from 5 major sources with the option to include TikTok when needed, providing comprehensive coverage of the HVAC Know It All brand across digital platforms. \ No newline at end of file +The system successfully aggregates content from 5 major sources with the option to include TikTok when needed, providing comprehensive coverage of the HKIA brand across digital platforms. \ No newline at end of file diff --git a/docs/final_status.md b/docs/final_status.md index eae226b..4dd2b12 100644 --- a/docs/final_status.md +++ b/docs/final_status.md @@ -1,8 +1,8 @@ -# HVAC Know It All Content Aggregation System - Final Status +# HKIA Content Aggregation System - Final Status ## šŸŽ‰ Project Complete! -The HVAC Know It All content aggregation system has been successfully implemented and tested. All 6 content sources are working, with deployment-ready infrastructure. +The HKIA content aggregation system has been successfully implemented and tested. All 6 content sources are working, with deployment-ready infrastructure. ## āœ… **All Sources Working (6/6)** @@ -20,7 +20,7 @@ The HVAC Know It All content aggregation system has been successfully implemente ### āœ… Content Aggregation - **Incremental Updates**: Only fetches new content since last run - **State Management**: JSON state files track last sync timestamps -- **Markdown Generation**: Standardized format `hvacknowitall_{source}_{timestamp}.md` +- **Markdown Generation**: Standardized format `hkia_{source}_{timestamp}.md` - **Archive Management**: Automatic archiving of previous content ### āœ… Technical Infrastructure @@ -30,7 +30,7 @@ The HVAC Know It All content aggregation system has been successfully implemente - **Session Persistence**: Instagram login session reuse ### āœ… Data Management -- **NAS Synchronization**: rsync to `/mnt/nas/hvacknowitall/` +- **NAS Synchronization**: rsync to `/mnt/nas/hkia/` - **File Organization**: Current and archived content separation - **Log Management**: Rotating logs with configurable retention @@ -87,9 +87,9 @@ Total: 6/6 passed │ ā”œā”€ā”€ tiktok_scraper_advanced.py # TikTok Scrapling │ └── orchestrator.py # Main coordinator ā”œā”€ā”€ systemd/ # Service configuration -│ ā”œā”€ā”€ hvac-scraper.service -│ ā”œā”€ā”€ hvac-scraper-morning.timer -│ └── hvac-scraper-afternoon.timer +│ ā”œā”€ā”€ hkia-scraper.service +│ ā”œā”€ā”€ hkia-scraper-morning.timer +│ └── hkia-scraper-afternoon.timer ā”œā”€ā”€ test_data/ # Test results │ ā”œā”€ā”€ recent/ # Recent content tests │ └── backlog/ # Backlog tests @@ -115,14 +115,14 @@ sudo ./install.sh ### **Manual Commands** ```bash # Check service status -systemctl status hvac-scraper-morning.timer -systemctl status hvac-scraper-afternoon.timer +systemctl status hkia-scraper-morning.timer +systemctl status hkia-scraper-afternoon.timer # Manual execution -sudo systemctl start hvac-scraper.service +sudo systemctl start hkia-scraper.service # View logs -journalctl -u hvac-scraper.service -f +journalctl -u hkia-scraper.service -f # Test individual sources python -m src.orchestrator --sources wordpress instagram @@ -204,7 +204,7 @@ python -m src.orchestrator --sources wordpress instagram ## šŸ† **Conclusion** -The HVAC Know It All content aggregation system successfully delivers on all requirements: +The HKIA content aggregation system successfully delivers on all requirements: - **Complete Coverage**: All 6 major content sources working - **Production Ready**: Robust error handling and deployment infrastructure @@ -212,6 +212,6 @@ The HVAC Know It All content aggregation system successfully delivers on all req - **Reliable**: Comprehensive testing and proven real-world performance - **Maintainable**: Clean architecture with extensive documentation -The system is ready for production deployment and will provide automated, comprehensive content aggregation for the HVAC Know It All brand across all digital platforms. +The system is ready for production deployment and will provide automated, comprehensive content aggregation for the HKIA brand across all digital platforms. **Project Status: āœ… COMPLETE AND PRODUCTION READY** \ No newline at end of file diff --git a/docs/project_specification.md b/docs/project_specification.md index b0dabc2..af32f19 100644 --- a/docs/project_specification.md +++ b/docs/project_specification.md @@ -209,7 +209,7 @@ k8s/ # Kubernetes manifests - Storage usage ## Version Control -- Private GitHub repository: https://github.com/bengizmo/hkia-content.git +- Private GitHub repository: https://github.com/bengizmo/hvacknowitall-content.git - Commit after major milestones - Semantic versioning - Comprehensive commit messages diff --git a/docs/status.md b/docs/status.md index c58292f..fb987a9 100644 --- a/docs/status.md +++ b/docs/status.md @@ -1,4 +1,4 @@ -# HVAC Know It All Content Aggregation - Project Status +# HKIA Content Aggregation - Project Status ## Current Status: 🟢 PRODUCTION READY @@ -69,10 +69,10 @@ - **Service Files**: Complete systemd configuration provided ### Configuration Files -- `systemd/hvac-scraper.service` - Main service definition -- `systemd/hvac-scraper.timer` - Scheduled execution -- `systemd/hvac-scraper-nas.service` - NAS sync service -- `systemd/hvac-scraper-nas.timer` - NAS sync schedule +- `systemd/hkia-scraper.service` - Main service definition +- `systemd/hkia-scraper.timer` - Scheduled execution +- `systemd/hkia-scraper-nas.service` - NAS sync service +- `systemd/hkia-scraper-nas.timer` - NAS sync schedule --- @@ -110,9 +110,9 @@ ## Next Steps for Production -1. Install systemd services: `sudo systemctl enable hvac-scraper.timer` +1. Install systemd services: `sudo systemctl enable hkia-scraper.timer` 2. Configure environment variables in `/opt/hvac-kia-content/.env` -3. Set up NAS mount point at `/mnt/nas/hvacknowitall/` -4. Monitor via systemd logs: `journalctl -f -u hvac-scraper.service` +3. Set up NAS mount point at `/mnt/nas/hkia/` +4. Monitor via systemd logs: `journalctl -f -u hkia-scraper.service` **Project Status: āœ… READY FOR PRODUCTION DEPLOYMENT** \ No newline at end of file diff --git a/update_docs_to_hkia.py b/update_docs_to_hkia.py new file mode 100644 index 0000000..d81067d --- /dev/null +++ b/update_docs_to_hkia.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python3 +""" +Update all documentation files to use hkia naming convention. +""" + +import re +from pathlib import Path +import logging + +logging.basicConfig(level=logging.INFO, format='%(message)s') +logger = logging.getLogger(__name__) + +def update_doc_file(file_path: Path) -> bool: + """Update documentation file to use hkia naming.""" + try: + with open(file_path, 'r', encoding='utf-8') as f: + content = f.read() + + original_content = content + + # Replace various forms of the old naming + patterns = [ + # Basic replacements + (r'hvacknowitall', 'hkia'), + (r'hvacnkowitall', 'hkia'), + (r'HVACKNOWITALL', 'HKIA'), + (r'HVACNKOWITALL', 'HKIA'), + + # Full name replacements + (r'HVAC Know It All', 'HKIA'), + (r'HVAC KNOW IT ALL', 'HKIA'), + (r'HvacKnowItAll', 'HKIA'), + + # Path replacements + (r'/mnt/nas/hvacknowitall', '/mnt/nas/hkia'), + (r'hvac-kia-content', 'hvac-kia-content'), # Keep repo name as is + + # Service name replacements + (r'hvac-content-', 'hkia-content-'), + (r'hvac-scraper', 'hkia-scraper'), + + # Keep these unchanged (repo/project names) + (r'github\.com/bengizmo/hkia-content', 'github.com/bengizmo/hvacknowitall-content'), + (r'hvac-kia-content', 'hvac-kia-content'), # project directory + ] + + for pattern, replacement in patterns: + content = re.sub(pattern, replacement, content, flags=re.IGNORECASE if not pattern.startswith('/') else 0) + + # Fix any double replacements + content = content.replace('hkia-kia', 'hvac-kia') + + if content != original_content: + with open(file_path, 'w', encoding='utf-8') as f: + f.write(content) + logger.info(f"āœ… Updated: {file_path.name}") + return True + else: + logger.info(f"ā„¹ļø No changes needed: {file_path.name}") + return False + except Exception as e: + logger.error(f"āŒ Error updating {file_path}: {e}") + return False + +def main(): + """Main update process for documentation.""" + logger.info("=" * 60) + logger.info("UPDATING DOCUMENTATION TO HKIA NAMING") + logger.info("=" * 60) + + base_dir = Path('/home/ben/dev/hvac-kia-content') + + # Documentation files to update + doc_files = [ + 'README.md', + 'CLAUDE.md', + 'DEPLOY.md', + 'docs/project_specification.md', + 'docs/image_downloads.md', + 'docs/status.md', + 'docs/final_status.md', + 'docs/deployment_strategy.md', + 'docs/DEPLOYMENT_CHECKLIST.md', + 'docs/PRODUCTION_TODO.md', + 'BACKLOG_STATUS.md', + 'UPDATED_CAPTURE_STATUS.md', + 'FINAL_TALLY_REPORT.md', + ] + + # Update documentation files + logger.info("\nšŸ“ Updating documentation files...") + updated_count = 0 + + for file_path in doc_files: + full_path = base_dir / file_path + if full_path.exists(): + if update_doc_file(full_path): + updated_count += 1 + else: + logger.info(f"āš ļø File not found: {file_path}") + + # Summary + logger.info("\n" + "=" * 60) + logger.info("DOCUMENTATION UPDATE COMPLETE") + logger.info("=" * 60) + logger.info(f"Files updated: {updated_count}") + logger.info("\nNext steps:") + logger.info("1. Review changes with 'git diff'") + logger.info("2. Commit documentation updates") + logger.info("3. Push to repository") + +if __name__ == "__main__": + main() \ No newline at end of file