╔════════════════════════════════════════════════════════════╗
║         AGENDA INFORME SCRAPER - SETUP GUIDE               ║
║                                                            ║
║  Ultra-simple. No Flask. No web server. Just works.        ║
╚════════════════════════════════════════════════════════════╝

─────────────────────────────────────────────────────────────
🖥️  WINDOWS
─────────────────────────────────────────────────────────────

Quick Start:
  1. Double-click: run.bat
  2. Wait ~15 seconds for scraping
  3. Files generated:
     - calendar.ics (270 events)
     - events_cache.json (backup)

Manual Run:
  Command Prompt or PowerShell:
    python agenda_simple.py

Auto-weekly Run (optional):
  Windows Task Scheduler → Create Task
    Program: python.exe
    Args: agenda_simple.py
    Trigger: Weekly (choose day/time)

─────────────────────────────────────────────────────────────
🐧 LINUX / MAC
─────────────────────────────────────────────────────────────

Quick Start:
  1. Make executable:
     chmod +x run.sh

  2. Run scraper:
     ./run.sh

  3. Files generated:
     - calendar.ics (270 events)
     - events_cache.json (backup)

Manual Run:
  ./run.sh

Auto-weekly Run (WITH CRON):
  1. Make scripts executable:
     chmod +x run.sh install-cron.sh

  2. Install cron job:
     ./install-cron.sh

  3. Choose day & time (prompts you)

  4. Done! Runs automatically every week

View Installed Jobs:
  crontab -l

Remove Cron Job:
  ./uninstall-cron.sh

─────────────────────────────────────────────────────────────
📂 PROJECT FILES
─────────────────────────────────────────────────────────────

CORE:
  • agenda_simple.py            Scraper (8.8 KB)
  • requirements_simple.txt      Dependencies
  • calendar.ics                 Generated calendar (94.9 KB)
  • events_cache.json            Backup (71.4 KB)

WINDOWS:
  • run.bat                      Quick launcher

LINUX/MAC:
  • run.sh                       Quick launcher
  • install-cron.sh              Setup weekly auto-run
  • uninstall-cron.sh            Remove auto-run
  • LINUX_SETUP.md               Full Linux guide

DOCS:
  • README.md                    Main readme
  • HOWTO.txt                    Quick usage
  • SETUP_SUMMARY.md             This file

─────────────────────────────────────────────────────────────
📲 IMPORT TO GOOGLE CALENDAR
─────────────────────────────────────────────────────────────

Method 1: Manual Import
  1. Go to: https://calendar.google.com
  2. Settings → Import & Export
  3. Click: Import
  4. Choose: calendar.ics
  5. Select target calendar
  6. Click: Import

Method 2: Subscribe to URL
  (If you have a web server hosting the file)
  1. Go to: https://calendar.google.com
  2. "+ Add other calendars"
  3. "Subscribe to calendar"
  4. Enter URL to calendar.ics
  5. Click: Subscribe

─────────────────────────────────────────────────────────────
⚙️  REQUIREMENTS
─────────────────────────────────────────────────────────────

Requirements:
  • Python 3.7+
  • pip (Python package manager)
  • Internet connection (for scraping)
  • ~200 KB disk space

Install Python:
  Windows: https://www.python.org/downloads/
  Linux: sudo apt install python3 python3-pip
  Mac: brew install python3

Dependencies (auto-installed):
  - requests 2.31.0 (HTTP)
  - beautifulsoup4 4.12.2 (HTML parsing)

─────────────────────────────────────────────────────────────
🔧 TROUBLESHOOTING
─────────────────────────────────────────────────────────────

"Python not found"
  → Install Python from python.org (Windows)
  → Run: sudo apt install python3 (Linux)

"ModuleNotFoundError"
  → Run: pip install -r requirements_simple.txt

"Permission denied" (Linux)
  → Run: chmod +x run.sh install-cron.sh

Cron job not running?
  → Check: crontab -l
  → View logs: tail cron.log
  → Run manually: ./run.sh

calendar.ics not updating?
  → Run scraper again: ./run.sh (or run.bat)
  → Check internet connection
  → Check agenda-informe.com is online

─────────────────────────────────────────────────────────────
💡 EXAMPLES
─────────────────────────────────────────────────────────────

Windows - Run now:
  > python agenda_simple.py

Linux - Run now:
  $ ./run.sh

Linux - Schedule Monday 8 AM:
  $ ./install-cron.sh
  Pick: day=1, hour=8, minute=0

Linux - Schedule Friday 2 PM:
  $ ./install-cron.sh
  Pick: day=5, hour=14, minute=0

Linux - View scheduled jobs:
  $ crontab -l

Linux - Remove scheduled job:
  $ ./uninstall-cron.sh

─────────────────────────────────────────────────────────────
📊 WHAT HAPPENS
─────────────────────────────────────────────────────────────

When you run the scraper:

1. Connects to: agenda-informe.com/agenda
2. Scrapes 10 pages (~15 seconds)
3. Extracts 270 events with:
   - Title
   - Date/Time
   - Location
   - Description
4. Generates: calendar.ics (RFC 5545 format)
5. Backs up: events_cache.json
6. Done! Ready to import

─────────────────────────────────────────────────────────────
🎯 NEXT STEPS
─────────────────────────────────────────────────────────────

1. Run once:
   Windows: Double-click run.bat
   Linux: ./run.sh

2. Import to Google Calendar:
   - Method 1: Upload calendar.ics file
   - Method 2: Subscribe to URL (if on web server)

3. (Optional) Schedule auto-run:
   Windows: Task Scheduler
   Linux: ./install-cron.sh

4. That's it! Enjoy your synced calendar 🎉

─────────────────────────────────────────────────────────────

Questions? Check:
  - HOWTO.txt - Quick usage
  - LINUX_SETUP.md - Linux detailed guide
  - README.md - Project overview

─────────────────────────────────────────────────────────────
