#!/usr/bin/env bash set -e echo "📂 Creating Flask BookScraper structure in current directory..." # --- Create folders --- mkdir -p scraper mkdir -p templates mkdir -p static # --- Create empty files --- touch app.py touch scraper/__init__.py touch scraper/scraper.py touch scraper/sites.py touch scraper/utils.py touch templates/index.html touch templates/result.html touch static/.keep # empty placeholder to keep folder under git # --- Optional: auto-create requirements file --- cat < requirements.txt flask requests beautifulsoup4 lxml pillow EOF echo "🎉 Structure created successfully!" # Show structure echo if command -v tree >/dev/null 2>&1; then tree . else echo "Install 'tree' for pretty output. Current structure:" ls -R . fi