# ๐Ÿ“… DailyWallpaperHub > Multi-source Wallpaper Aggregator ยท Auto-archive Bing + Unsplash ยท AI Visual Story Generation ยท WeChat Push ยท GitHub Pages Gallery [English](README_EN.md) | [ไธญๆ–‡](README.md) [![Daily Update](https://github.com/Hana19951208/DailyWallpaperHub/actions/workflows/daily.yml/badge.svg)](https://github.com/Hana19951208/DailyWallpaperHub/actions/workflows/daily.yml) [![Pages](https://img.shields.io/badge/GitHub%20Pages-Online-brightgreen)](https://Hana19951208.github.io/DailyWallpaperHub/) --- ## โœจ Features - **๐ŸŽจ Multi-Source Aggregation**: Supports multiple wallpaper sources like Bing and Unsplash. Configurable and easy to extend. - **โšก๏ธ Async Architecture**: AI story generation runs asynchronously. Main process is fast, making images available immediately. - **๐Ÿค– AI Visual Stories**: Integrated with LLM visual models to auto-generate exquisite cultural stories (approx. 500 words) for each wallpaper. - **๐Ÿ“ Externalized Prompts**: AI prompts stored in `prompts/story_prompt.txt` for easy customization. - **โฐ Smart Scheduling**: GitHub Actions checks for updates every hour to get the latest wallpapers ASAP. - **๐Ÿ’พ Persistent Archiving**: High-res images, thumbnails, metadata (JSON), and AI stories are auto-committed to the repo, never lost. - **๐ŸŽญ Modern Gallery**: Built-in GitHub Pages gallery with responsive design and dark mode. - **๐Ÿ“ฑ WeChat Push**: Automatically pushes images, metadata, and AI stories to Enterprise WeChat groups (Markdown supported). - **๐ŸŽฏ Quantity Limit**: Default index shows only the last 10 days to avoid clutter (adjustable in `config/sources.yaml`). - **๐Ÿ›  Batch Tools**: Supports batch fetching of historical wallpapers by date and source. - **๐Ÿ’ฐ Zero Cost**: Built entirely on free GitHub resources. --- ## ๐Ÿ–ผ Showcase ### Online Gallery ![Gallery Screenshot](docs/preview.png) ### AI Stories (Click Title to Read) Click the title in the wallpaper index to jump to the AI-generated background story (includes original image display). --- ## ๐Ÿ“… Wallpaper Index (Latest)
ๆ—ฅๆœŸBing ๐Ÿ”Unsplash ๐Ÿ“ท
2026-01-09
ๅฝ“่Š‚ๆ—ฅ็š„้ญ”ๆณ•่ธฉ็€่น„ๅฃฐ่€Œๆฅ ๐Ÿ“–

a view of a mountain range from a plane ๐Ÿ“–
2026-01-08
ๆ—ถๅ…‰ๅœจๆญคๅค„่Œๅฃฎๆˆ้•ฟ ๐Ÿ“–

brown concrete building near green trees under cloudy sky during daytime ๐Ÿ“–
2026-01-07
ๅบŸๅขŸไน‹ไธŠ๏ผŒๆค‹้ธŸ็พค่ˆž ๐Ÿ“–

green trees on brown mountain near body of water during daytime ๐Ÿ“–
2026-01-06
ๅค่€ๅฒฉ็Ÿณ็š„ไผ ๅฅ‡ ๐Ÿ“–

a house in the middle of a mountain range
2026-01-05
ๅŠชๅ…‹็š„ๆ…ตๆ‡’ๆ—ถๅ…‰ ๐Ÿ“–

white and brown house near body of water during daytime ๐Ÿ“–
2026-01-04
้ซ˜่ง’็พš็พค็ดงๆ€ฅๆˆ’ๅค‡ ๐Ÿ“–

snow covered mountain under starry night ๐Ÿ“–
2026-01-03
็Ž‹่€…่ง†้‡Ž ๐Ÿ“–

Nature trail surrounded by trees. ๐Ÿ“–
2026-01-02
ไผ ๅฅ‡ๆ•…ไบ‹ๅ‰็š„็ฏ‡็ซ  ๐Ÿ“–

A dirt road in front of a snow covered mountain ๐Ÿ“–
2026-01-01
ๅจๅฐผๆ–ฏ็š„็ต้ญ‚ ๐Ÿ“–

a view of the mountains from the top of a hill ๐Ÿ“–
2025-12-31
ไผธไธชๆ‡’่…ฐ๏ผŒ่ฟˆๅ‘ๆ–ฐๅนด๏ผ ๐Ÿ“–

gray concrete bridge over river under cloudy sky during daytime ๐Ÿ“–
--- ## ๐Ÿš€ Quick Start ### Local Development ```bash # 1. Clone repository git clone https://github.com/Hana19951208/DailyWallpaperHub.git cd DailyWallpaperHub # 2. Install dependencies (using conda env) conda activate base pip install -r requirements.txt # 3. Configure Environment Variables cp .env.example .env # Edit .env file with your configurations: # WEWORK_WEBHOOK=your_webhook_url # LLM_API_KEY=your_api_key # LLM_BASE_URL=https://api.openai.com/v1 # LLM_MODEL_NAME=gpt-4o # UNSPLASH_ACCESS_KEY=your_unsplash_key # 4. Fast Fetch (Skip Story) python fetch_bing_wallpaper.py --skip-story python fetch_unsplash_wallpaper.py --skip-story # 5. Async Story Generation (Background) python scripts/generate_missing_stories.py # 6. Batch Fetch History python batch_fetch.py bing 2025-12 # Fetch Bing whole month python batch_fetch.py unsplash 2025-12-10 # Fetch Unsplash specific date ``` ### GitHub Actions Deployment 1. **Fork this repository** 2. **Configure GitHub Secrets** (Settings โ†’ Secrets and variables โ†’ Actions): - `WEWORK_WEBHOOK`: Enterprise WeChat Robot Webhook URL - `LLM_API_KEY`: LLM API Key - `LLM_BASE_URL`: LLM API Base URL - `LLM_MODEL_NAME`: LLM Model Name - `UNSPLASH_ACCESS_KEY`: Unsplash API Access Key 3. **Enable GitHub Pages**: - Settings โ†’ Pages - Source: Deploy from a branch - Branch: `main` / `docs` 4. **Trigger manually or wait for schedule**: - Actions โ†’ Daily Wallpaper Fetch โ†’ Run workflow --- ## ๐Ÿ“ Project Structure ``` DailyWallpaperHub/ โ”œโ”€โ”€ config/ โ”‚ โ””โ”€โ”€ sources.yaml # Data Source Config โ”œโ”€โ”€ prompts/ โ”‚ โ””โ”€โ”€ story_prompt.txt # AI Prompt Template โ”œโ”€โ”€ scripts/ โ”‚ โ”œโ”€โ”€ fill_unsplash_dec.py # Unsplash Data Fill Script โ”‚ โ””โ”€โ”€ generate_missing_stories.py # Async Story Gen Script โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ config_loader.py # Config Loader โ”‚ โ”œโ”€โ”€ utils.py # WeChat Push Utils โ”‚ โ”œโ”€โ”€ update_readme.py # README Updater โ”‚ โ””โ”€โ”€ update_gallery.py # Gallery Updater โ”œโ”€โ”€ docs/ โ”‚ โ”œโ”€โ”€ index.html # GitHub Pages Gallery โ”‚ โ””โ”€โ”€ wallpapers/ # 404 Fix: Wallpapers must be here for Pages โ”‚ โ”œโ”€โ”€ bing/ โ”‚ โ”‚ โ””โ”€โ”€ YYYY-MM-DD/ โ”‚ โ”‚ โ”œโ”€โ”€ image.jpg โ”‚ โ”‚ โ”œโ”€โ”€ thumb.jpg โ”‚ โ”‚ โ”œโ”€โ”€ meta.json โ”‚ โ”‚ โ””โ”€โ”€ story.md โ”‚ โ””โ”€โ”€ unsplash/ โ”‚ โ””โ”€โ”€ YYYY-MM-DD/ โ”‚ โ”œโ”€โ”€ image.jpg โ”‚ โ”œโ”€โ”€ thumb.jpg โ”‚ โ”œโ”€โ”€ meta.json โ”‚ โ””โ”€โ”€ story.md โ”œโ”€โ”€ .github/workflows/ โ”‚ โ””โ”€โ”€ daily.yml # Automation Workflow โ”œโ”€โ”€ fetch_bing_wallpaper.py # Bing Fetcher โ”œโ”€โ”€ fetch_unsplash_wallpaper.py # Unsplash Fetcher โ”œโ”€โ”€ batch_fetch.py # Batch Tool โ”œโ”€โ”€ requirements.txt # Python Dependencies โ””โ”€โ”€ README.md # Documentation ``` --- ## ๐ŸŽฏ Usage Guide ### Async Story Generation To improve user experience, this project uses an asynchronous architecture: 1. **Fast Mode** (Default/Recommended): ```bash python fetch_bing_wallpaper.py --skip-story ``` - Downloads images and metadata only - Immediately updates README and Gallery - Images viewable instantly 2. **Background Story Generation**: ```bash python scripts/generate_missing_stories.py ``` - Scans for wallpapers missing stories - Batch calls LLM to generate stories - Auto-updates metadata and pages ### Batch Fetching ```bash # Fetch Bing Wallpapers python batch_fetch.py bing 2025-12 # Whole Month python batch_fetch.py bing 2025-12-10 # Specific Date # Fetch Unsplash Wallpapers python batch_fetch.py unsplash 2025-12 # Whole Month (Multiple Featured) python batch_fetch.py unsplash 2025-12-10 # Specific Date # Source Case Insensitive python batch_fetch.py BING 2025-12 python batch_fetch.py Unsplash 2025-12-10 ``` ### Adding New Sources 1. Edit `config/sources.yaml`: ```yaml sources: - name: new_source display_name: "New Source ๐ŸŽจ" enabled: true api_key_env: "NEW_SOURCE_API_KEY" fetcher_script: "fetch_new_source.py" ``` 2. Create `fetch_new_source.py` fetcher script 3. Run tests and commit --- ## ๐Ÿค Follow Me WeChat Official Account > Scan to follow "Knowledge into System" (ๆŠŠ็Ÿฅ่ฏ†ๅ˜ๆˆ็ณป็ปŸ) ## โš–๏ธ License MIT License. For learning and exchange only. Wallpaper copyrights belong to Bing and Unsplash.