Travel Itinerary Builder
Generate comprehensive, print-ready travel itineraries with automatic integration of weather, places, dining, transportation, and budget planning.
⚠️ Security & Privacy Notice
This skill accesses sensitive data and requires external credentials:
Gmail Access (Optional)
- The
gmail_parser.py script reads your Gmail messages to extract booking confirmations
- Requires
GOG_KEYRING_PASSWORD environment variable (for GOG CLI authentication)
- What it accesses: Email subjects, snippets, and full message bodies matching search queries
- What it extracts: Flight details (PNR, times), hotel bookings, car rentals, activity tickets
- Data handling: Extracted data is stored locally in JSON files; no external transmission
Google Places API (Optional)
- The
places_fetcher.py script queries Google Places for attractions
- Requires
GOOGLE_PLACES_API_KEY environment variable (free tier: 1000 requests/month)
- Fallback to built-in database if API key not provided
External CLI Dependencies
- gog (Google OAuth CLI): Authenticates Gmail access via OAuth2
- goplaces: Queries Google Places API
- curl: Fetches weather data from wttr.in
Before installing:
- Review all scripts in
scripts/ directory
- Only provide credentials if you trust the external CLIs
- Consider running in an isolated environment (container/VM)
- Gmail integration is optional — you can use the skill without it
Quick Start
Basic Usage
# Generate itinerary from user input
python3 scripts/generate_itinerary.py \
--destination "Tokyo, Osaka, Kyoto" \
--start-date "2026-03-06" \
--end-date "2026-03-15" \
--language zh \
--output ./japan_trip.html
With Gmail Integration
# Extract bookings from Gmail and generate itinerary
python3 scripts/gmail_parser.py \
--account rachelchoo1212@gmail.com \
--after "2026-03-01" \
--output ./bookings.json
python3 scripts/generate_itinerary.py \
--bookings ./bookings.json \
--destination "Tokyo, Osaka" \
--start-date "2026-03-06" \
--end-date "2026-03-15" \
--output ./trip.html
Core Features
1. Automatic Data Collection
- Weather forecasts: Integrates with
weather skill for daily forecasts
- Points of interest: Uses
goplaces skill for attractions, restaurants, landmarks
- Multi-language names: Shows place names in user language + local language
- Gmail parsing: Extracts flight, hotel, car rental bookings from confirmation emails
2. Intelligent Planning
- Daily schedules: Auto-generates time-based itineraries (08:00 departure → 10:00 attraction → 12:00 lunch)
- Transportation routing: Calculates distances, travel times, and costs for driving/transit
- Budget estimation: Computes total costs for accommodation, meals, transport, tickets
- Packing lists: Generates climate-appropriate packing suggestions
3. Output Formats
- HTML: Beautiful dark-themed, print-ready documents (based on proven template)
- Markdown: Editable plain-text format
- JSON: Structured data for further processing
- PDF: Optional export via HTML → PDF conversion
Workflow
Step 1: Gather Information
Ask user for:
- Destinations (cities/regions)
- Travel dates (start and end)
- Budget range (optional)
- Interests/tags (history, nature, food, shopping, concerts)
- Language preference (zh, en, ja, ko)
- Special requirements (dietary, accessibility, child-friendly)
Step 2: Extract Existing Bookings (Optional)
If user has Gmail access configured:
python3 scripts/gmail_parser.py \
--account <email> \
--after <YYYY-MM-DD> \
--keywords "flight,hotel,booking,reservation,confirmation" \
--output bookings.json
This extracts:
- ✈️ Flights: airline, flight number, departure/arrival times, PNR
- 🏨 Hotels: name, address, check-in/out dates, booking number, price
- 🚗 Car rentals: company, car type, pickup/return times, booking number
- 🎫 Tickets: concerts, museums, activities with times and seat info
Supported platforms: Agoda, Booking.com, Singapore Airlines, ANA, Trip.com, Klook, KKday
Step 3: Query Weather and Places
# Weather forecasts for each destination
python3 scripts/weather_fetcher.py \
--destinations "Tokyo,Osaka,Kyoto" \
--start-date "2026-03-06" \
--end-date "2026-03-15" \
--output weather.json
# Points of interest
python3 scripts/places_fetcher.py \
--destinations "Tokyo,Osaka,Kyoto" \
--interests "temples,food,shopping" \
--language zh \
--output places.json
Step 4: Generate Itinerary
python3 scripts/generate_itinerary.py \
--bookings bookings.json \
--weather weather.json \
--places places.json \
--start-date "2026-03-06" \
--end-date "2026-03-15" \
--budget 2000 \
--currency SGD \
--language zh \
--output japan_trip.html
Step 5: Export (Optional)
# Export to PDF
python3 scripts/export_pdf.py japan_trip.html japan_trip.pdf
# Sync to Notion (if configured)
python3 scripts/sync_notion.py japan_trip.json
Scripts Reference
generate_itinerary.py
Core generator. Combines all data sources into a complete itinerary.
Arguments:
--destination: Comma-separated list of cities/regions
--start-date: Trip start date (YYYY-MM-DD)
--end-date: Trip end date (YYYY-MM-DD)
--bookings: Path to bookings JSON (from gmail_parser.py)
--weather: Path to weather JSON (from weather_fetcher.py)
--places: Path to places JSON (from places_fetcher.py)
--budget: Total budget amount (optional)
--currency: Currency code (SGD, USD, JPY, etc.)
--language: Output language (zh, en, ja, ko)
--interests: Comma-separated tags (history, nature, food, shopping, concerts)
--output: Output file path (.html, .md, or .json)
gmail_parser.py
Extracts travel bookings from Gmail using GOG skill.
Requirements: GOG_KEYRING_PASSWORD environment variable
Arguments:
--account: Gmail account email
--after: Start date for email search (YYYY-MM-DD)
--keywords: Search keywords (default: "flight,hotel,booking,confirmation")
--output: Output JSON file
weather_fetcher.py
Fetches weather forecasts for destinations using weather skill.
Arguments:
--destinations: Comma-separated cities
--start-date: Forecast start date
--end-date: Forecast end date
--output: Output JSON file
places_fetcher.py
Queries points of interest using goplaces skill.
Arguments:
--destinations: Comma-separated cities
--interests: Activity tags (temples, museums, food, shopping)
--language: Display language
--output: Output JSON file
translator.py
Translates place names to multiple languages.
Arguments:
--text: Text to translate
--source-lang: Source language code
--target-langs: Comma-separated target language codes
--output: Output JSON file
budget_calculator.py
Estimates trip costs based on destination, duration, and bookings.
Arguments:
--destination: Primary destination
--days: Number of days
--bookings: Path to bookings JSON
--category: Budget category (budget, mid-range, luxury)
--output: Output JSON file
export_html.py
Converts itinerary JSON to styled HTML using template.
Arguments:
--input: Itinerary JSON file
--template: HTML template (default: assets/itinerary_template.html)
--output: Output HTML file
References
- destination_templates.md: Pre-built templates for popular destinations (Tokyo, Seoul, Paris, etc.)
- travel_tips.md: Climate guides, packing lists, visa requirements, cultural tips
- email_patterns.md: Email parsing rules for different booking platforms
- poi_database.md: Common attractions with multi-language names
Assets
- itinerary_template.html: Dark-themed HTML template with CSS styling
- icons/: SVG icons for flights, hotels, restaurants, attractions
- fonts/: Web fonts for print-quality output
Multi-Language Support
Place names are displayed in user language + local language:
东京塔 (東京タワー / Tokyo Tower)
和歌山城 (和歌山城 / Wakayama Castle)
Supported languages: Chinese (zh), English (en), Japanese (ja), Korean (ko)
Output Example
Generated HTML includes:
- 📅 Day-by-day timeline with emoji icons
- 🌤️ Daily weather forecasts
- ✈️ Flight details with boarding times
- 🏨 Hotel information with check-in/out
- 🚗 Driving routes with distances and tolls
- 🍽️ Restaurant recommendations with local specialties
- 💰 Budget breakdown by category
- 📋 Packing checklist based on climate
- ⚠️ Important reminders (visa, insurance, IDP)
Integration with Other Skills
This skill calls:
weather — Daily forecasts
goplaces — Attraction and restaurant search
gog — Gmail parsing (optional, requires GOG_KEYRING_PASSWORD)
notion — Sync to Notion database (optional, requires Notion API key)
Tips
- For self-driving trips: Include rental car details, calculate fuel costs, note toll roads
- For concert/event trips: Add venue info, seating, merchandise shop times
- For multi-city trips: Calculate transit times between cities
- For international trips: Include visa requirements, vaccination, travel insurance reminders
Troubleshooting
- Gmail parsing fails: Check GOG_KEYRING_PASSWORD is set and account has access
- Weather data missing: Ensure dates are within forecast range (usually 10 days)
- Places not found: Try broader search terms or check goplaces API key
- HTML rendering issues: Open in modern browser (Chrome, Firefox, Safari)
Future Enhancements
- Real-time flight status updates
- Amadeus API integration for flight price tracking
- Google Sheets export for budget tracking
- PDF generation without external tools
- Mobile-responsive HTML output
1---2name: travel-itinerary-builder3description: Comprehensive travel itinerary generator that creates detailed, multi-day trip plans with automatic weather forecasts, points of interest, restaurant recommendations, transportation logistics, and budget estimates. Generates print-ready HTML documents with dark theme styling. Use when: (1) Planning a trip and need a complete itinerary, (2) User provides destination(s) and dates, (3) Organizing travel bookings (flights, hotels, car rentals) from Gmail, (4) Need multi-language support for destination names, (5) Creating printable travel documents, (6) Estimating travel budgets and costs.4---56# Travel Itinerary Builder78Generate comprehensive, print-ready travel itineraries with automatic integration of weather, places, dining, transportation, and budget planning.910## ⚠️ Security & Privacy Notice1112**This skill accesses sensitive data and requires external credentials:**1314### Gmail Access (Optional)15- The `gmail_parser.py` script **reads your Gmail messages** to extract booking confirmations16- Requires `GOG_KEYRING_PASSWORD` environment variable (for GOG CLI authentication)17- **What it accesses**: Email subjects, snippets, and full message bodies matching search queries18- **What it extracts**: Flight details (PNR, times), hotel bookings, car rentals, activity tickets19- **Data handling**: Extracted data is stored locally in JSON files; no external transmission2021### Google Places API (Optional)22- The `places_fetcher.py` script queries Google Places for attractions23- Requires `GOOGLE_PLACES_API_KEY` environment variable (free tier: 1000 requests/month)24- Fallback to built-in database if API key not provided2526### External CLI Dependencies27- **gog** (Google OAuth CLI): Authenticates Gmail access via OAuth228- **goplaces**: Queries Google Places API29- **curl**: Fetches weather data from wttr.in3031**Before installing**:321. Review all scripts in `scripts/` directory332. Only provide credentials if you trust the external CLIs343. Consider running in an isolated environment (container/VM)354. Gmail integration is **optional** — you can use the skill without it3637## Quick Start3839### Basic Usage4041```bash42# Generate itinerary from user input43python3 scripts/generate_itinerary.py \44 --destination "Tokyo, Osaka, Kyoto" \45 --start-date "2026-03-06" \46 --end-date "2026-03-15" \47 --language zh \48 --output ./japan_trip.html49```5051### With Gmail Integration5253```bash54# Extract bookings from Gmail and generate itinerary55python3 scripts/gmail_parser.py \56 --account rachelchoo1212@gmail.com \57 --after "2026-03-01" \58 --output ./bookings.json5960python3 scripts/generate_itinerary.py \61 --bookings ./bookings.json \62 --destination "Tokyo, Osaka" \63 --start-date "2026-03-06" \64 --end-date "2026-03-15" \65 --output ./trip.html66```6768## Core Features6970### 1. Automatic Data Collection71- **Weather forecasts**: Integrates with `weather` skill for daily forecasts72- **Points of interest**: Uses `goplaces` skill for attractions, restaurants, landmarks73- **Multi-language names**: Shows place names in user language + local language74- **Gmail parsing**: Extracts flight, hotel, car rental bookings from confirmation emails7576### 2. Intelligent Planning77- **Daily schedules**: Auto-generates time-based itineraries (08:00 departure → 10:00 attraction → 12:00 lunch)78- **Transportation routing**: Calculates distances, travel times, and costs for driving/transit79- **Budget estimation**: Computes total costs for accommodation, meals, transport, tickets80- **Packing lists**: Generates climate-appropriate packing suggestions8182### 3. Output Formats83- **HTML**: Beautiful dark-themed, print-ready documents (based on proven template)84- **Markdown**: Editable plain-text format85- **JSON**: Structured data for further processing86- **PDF**: Optional export via HTML → PDF conversion8788## Workflow8990### Step 1: Gather Information9192Ask user for:93- Destinations (cities/regions)94- Travel dates (start and end)95- Budget range (optional)96- Interests/tags (history, nature, food, shopping, concerts)97- Language preference (zh, en, ja, ko)98- Special requirements (dietary, accessibility, child-friendly)99100### Step 2: Extract Existing Bookings (Optional)101102If user has Gmail access configured:103104```bash105python3 scripts/gmail_parser.py \106 --account <email> \107 --after <YYYY-MM-DD> \108 --keywords "flight,hotel,booking,reservation,confirmation" \109 --output bookings.json110```111112This extracts:113- ✈️ Flights: airline, flight number, departure/arrival times, PNR114- 🏨 Hotels: name, address, check-in/out dates, booking number, price115- 🚗 Car rentals: company, car type, pickup/return times, booking number116- 🎫 Tickets: concerts, museums, activities with times and seat info117118Supported platforms: Agoda, Booking.com, Singapore Airlines, ANA, Trip.com, Klook, KKday119120### Step 3: Query Weather and Places121122```bash123# Weather forecasts for each destination124python3 scripts/weather_fetcher.py \125 --destinations "Tokyo,Osaka,Kyoto" \126 --start-date "2026-03-06" \127 --end-date "2026-03-15" \128 --output weather.json129130# Points of interest131python3 scripts/places_fetcher.py \132 --destinations "Tokyo,Osaka,Kyoto" \133 --interests "temples,food,shopping" \134 --language zh \135 --output places.json136```137138### Step 4: Generate Itinerary139140```bash141python3 scripts/generate_itinerary.py \142 --bookings bookings.json \143 --weather weather.json \144 --places places.json \145 --start-date "2026-03-06" \146 --end-date "2026-03-15" \147 --budget 2000 \148 --currency SGD \149 --language zh \150 --output japan_trip.html151```152153### Step 5: Export (Optional)154155```bash156# Export to PDF157python3 scripts/export_pdf.py japan_trip.html japan_trip.pdf158159# Sync to Notion (if configured)160python3 scripts/sync_notion.py japan_trip.json161```162163## Scripts Reference164165### `generate_itinerary.py`166Core generator. Combines all data sources into a complete itinerary.167168**Arguments**:169- `--destination`: Comma-separated list of cities/regions170- `--start-date`: Trip start date (YYYY-MM-DD)171- `--end-date`: Trip end date (YYYY-MM-DD)172- `--bookings`: Path to bookings JSON (from gmail_parser.py)173- `--weather`: Path to weather JSON (from weather_fetcher.py)174- `--places`: Path to places JSON (from places_fetcher.py)175- `--budget`: Total budget amount (optional)176- `--currency`: Currency code (SGD, USD, JPY, etc.)177- `--language`: Output language (zh, en, ja, ko)178- `--interests`: Comma-separated tags (history, nature, food, shopping, concerts)179- `--output`: Output file path (.html, .md, or .json)180181### `gmail_parser.py`182Extracts travel bookings from Gmail using GOG skill.183184**Requirements**: GOG_KEYRING_PASSWORD environment variable185186**Arguments**:187- `--account`: Gmail account email188- `--after`: Start date for email search (YYYY-MM-DD)189- `--keywords`: Search keywords (default: "flight,hotel,booking,confirmation")190- `--output`: Output JSON file191192### `weather_fetcher.py`193Fetches weather forecasts for destinations using weather skill.194195**Arguments**:196- `--destinations`: Comma-separated cities197- `--start-date`: Forecast start date198- `--end-date`: Forecast end date199- `--output`: Output JSON file200201### `places_fetcher.py`202Queries points of interest using goplaces skill.203204**Arguments**:205- `--destinations`: Comma-separated cities206- `--interests`: Activity tags (temples, museums, food, shopping)207- `--language`: Display language208- `--output`: Output JSON file209210### `translator.py`211Translates place names to multiple languages.212213**Arguments**:214- `--text`: Text to translate215- `--source-lang`: Source language code216- `--target-langs`: Comma-separated target language codes217- `--output`: Output JSON file218219### `budget_calculator.py`220Estimates trip costs based on destination, duration, and bookings.221222**Arguments**:223- `--destination`: Primary destination224- `--days`: Number of days225- `--bookings`: Path to bookings JSON226- `--category`: Budget category (budget, mid-range, luxury)227- `--output`: Output JSON file228229### `export_html.py`230Converts itinerary JSON to styled HTML using template.231232**Arguments**:233- `--input`: Itinerary JSON file234- `--template`: HTML template (default: assets/itinerary_template.html)235- `--output`: Output HTML file236237## References238239- **destination_templates.md**: Pre-built templates for popular destinations (Tokyo, Seoul, Paris, etc.)240- **travel_tips.md**: Climate guides, packing lists, visa requirements, cultural tips241- **email_patterns.md**: Email parsing rules for different booking platforms242- **poi_database.md**: Common attractions with multi-language names243244## Assets245246- **itinerary_template.html**: Dark-themed HTML template with CSS styling247- **icons/**: SVG icons for flights, hotels, restaurants, attractions248- **fonts/**: Web fonts for print-quality output249250## Multi-Language Support251252Place names are displayed in **user language + local language**:253254```255东京塔 (東京タワー / Tokyo Tower)256和歌山城 (和歌山城 / Wakayama Castle)257```258259Supported languages: Chinese (zh), English (en), Japanese (ja), Korean (ko)260261## Output Example262263Generated HTML includes:264- 📅 **Day-by-day timeline** with emoji icons265- 🌤️ **Daily weather** forecasts266- ✈️ **Flight details** with boarding times267- 🏨 **Hotel information** with check-in/out268- 🚗 **Driving routes** with distances and tolls269- 🍽️ **Restaurant recommendations** with local specialties270- 💰 **Budget breakdown** by category271- 📋 **Packing checklist** based on climate272- ⚠️ **Important reminders** (visa, insurance, IDP)273274## Integration with Other Skills275276This skill calls:277- `weather` — Daily forecasts278- `goplaces` — Attraction and restaurant search279- `gog` — Gmail parsing (optional, requires GOG_KEYRING_PASSWORD)280- `notion` — Sync to Notion database (optional, requires Notion API key)281282## Tips283284- **For self-driving trips**: Include rental car details, calculate fuel costs, note toll roads285- **For concert/event trips**: Add venue info, seating, merchandise shop times286- **For multi-city trips**: Calculate transit times between cities287- **For international trips**: Include visa requirements, vaccination, travel insurance reminders288289## Troubleshooting290291- **Gmail parsing fails**: Check GOG_KEYRING_PASSWORD is set and account has access292- **Weather data missing**: Ensure dates are within forecast range (usually 10 days)293- **Places not found**: Try broader search terms or check goplaces API key294- **HTML rendering issues**: Open in modern browser (Chrome, Firefox, Safari)295296## Future Enhancements297298- Real-time flight status updates299- Amadeus API integration for flight price tracking300- Google Sheets export for budget tracking301- PDF generation without external tools302- Mobile-responsive HTML output