A Python CLI tool for comparing sailboat specifications scraped from sailboatdata.com.
- π Scrape sailboat specifications from sailboatdata.com
- π Intelligent boat name search with automatic variations (number-word conversions, spacing, etc.)
- π Compare multiple boats side-by-side
- π¨ Beautiful table output with Rich library
- π PDF export with professional formatting
- π§ Nix flake for reproducible development environment
- π JSON export option
- π§Ή Filtered output (excludes UI elements like forum topics)
- βοΈ Automatic attribution to sailboatdata.com in all outputs
Choose one of the following installation methods:
- Nix with flakes enabled (recommended)
- Python 3.13+ with pip
- Conda/Mamba
- uv (fast Python package installer)
- Enable Nix flakes (if not already enabled):
# Add to ~/.config/nix/nix.conf or /etc/nix/nix.conf
experimental-features = nix-command flakes- Enter the development environment:
nix developOr use direnv for automatic environment loading:
direnv allowpip install -r requirements.txtconda env create -f environment.yml
conda activate sailboat-compareuv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -r requirements.txtCompare two or more sailboats:
python sailboat_compare.py "Catalina 30" "Hunter 33"Compare multiple boats:
python sailboat_compare.py "J/24" "J/80" "J/70"Export to JSON:
python sailboat_compare.py "Catalina 30" "Hunter 33" --format jsonExport to PDF:
python sailboat_compare.py "Catalina 30" "Hunter 33" --pdf comparison.pdfCombine table output and PDF export:
python sailboat_compare.py "J/24" "J/80" "J/70" --pdf boats.pdfGet help:
python sailboat_compare.py --help- The tool normalizes boat names to URL-friendly format
- If a boat is not found, automatically tries common variations:
- Number-word conversions (e.g., "30" β "thirty")
- Spacing variations (e.g., "Catalina30" β "Catalina 30")
- Decimal handling (e.g., "40.1" β "401")
- Brand/model reordering (e.g., "Beneteau Oceanis 40.1" β "Oceanis 401 Beneteau")
- Fetches boat pages from sailboatdata.com using pattern:
/sailboat/{normalized-name} - Parses HTML to extract specifications using BeautifulSoup with lxml parser
- Filters out unwanted UI elements (forum topics, navigation links)
- Displays results in a formatted comparison table using Rich
.
βββ flake.nix # Nix flake configuration
βββ sailboat_compare.py # Main CLI application
βββ README.md # This file
βββ .gitignore # Git ignore patterns
βββ .envrc # Direnv configuration
The flake provides a complete Python development environment with all dependencies:
- Python 3.13
- requests (HTTP client)
- beautifulsoup4 (HTML parsing)
- click (CLI framework)
- rich (terminal formatting)
- lxml (fast XML/HTML parser)
- reportlab (PDF generation)
- The tool uses appropriate User-Agent headers
- Intelligent name search tries multiple variations automatically
- Provides feedback when boats are found under alternative names
- Specifications extracted depend on the HTML structure of sailboatdata.com
- Handles multiple HTML parsing strategies (tables, definition lists, divs)
MIT
YOU MUST OBTAIN PERMISSION BEFORE USING THIS TOOL
This tool performs automated data collection from sailboatdata.com, which violates their Terms of Service without explicit written permission.
Sailboatdata.com's Terms of Service (Section 6) explicitly prohibit:
- "systematic or automated data collection activities"
- Use of automated tools that are "not a web browser"
- Request Permission: Contact sailboatdata.com at https://sailboatdata.com/contact/
- Obtain Written Authorization: Get explicit permission for automated access
- Comply with Their Terms: Follow any rate limits, attribution requirements, or other conditions they specify
Using this tool without permission may:
- Violate sailboatdata.com's Terms of Service
- Infringe on their intellectual property rights
- Result in legal action or IP blocking
This repository is provided for educational purposes only to demonstrate web scraping techniques. The maintainers:
- Do NOT endorse unauthorized use
- Are NOT responsible for any legal consequences
- Recommend obtaining proper authorization or using official APIs when available
See permission_request_email.md for a template to request access from sailboatdata.com.
