This project helps my dad automatically download Chinese calligraphy images from shufazidian.com to assist him with his drawing.
- Search for calligraphy images by author and character/phrase.
- Automatically match images with the chosen author.
- Save images to a local
images/folder.
Shufa-Character-Downloader
├── images/ # Downloaded calligraphy images (organized by character)
├── src/
│ ├── processHelpers/ # Helper scripts for different processing steps
│ │ ├── download.py # Handles downloading calligraphy images
│ │ ├── filtering.py # Handles finiding the right urls to use for each character.
│ │ ├── preprocess.py # Load, save and prepare the settings
│ │ ├── scrape.py # Scrapes image URLs and metadata from shufazidian.com
│ │ └── textRedirector.py # Redirects or maps text inputs for interface
│ ├── engine.py # Core engine that orchestrates scraping, downloading
│ ├── interface.py # User interface logic
│ └── setting.json # Configuration file to store user settings
├── myApp.py # Main entry point to launch the program
├── requirements.txt # Python dependencies
├── README.md # Project documentation
├── LICENSE # License information
└── .gitignore # Git ignore file
- Install Python (if not already installed):
- Windows: Download and install Python 3.9 or newer from python.org.
Make sure to check "Add Python to PATH" during installation. - Mac: Download from python.org or use Homebrew:
brew install python
- Create a virtual environment:
- Windows:
python -m venv venv venv\Scripts\activate
- macOS and Linux:
python3 -m venv venv source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the program:
-
Windows:
- Double-click
myApp.py. - If it opens in an editor instead of running, right-click → Open with → choose Python.
- Double-click
-
macOS:
Double-clickmyApp.py.
If it opens in a text editor instead of running:- Step 1: Right-click
myApp.py→ Get Info. - Step 2: Under Open with, select Python Launcher.
- Step 1: Right-click
-
Linux:
Make the file executable (one-time setup):chmod +x myApp.py
-
Fill in your input:
- Wait time: Number of seconds to wait between downloads (helps avoid being blocked and stuck on one task)
- Process Amount: Number of character being progress at a time.
- Download Amount: Total number of images to download per character.
- Author: Enter the calligraphy master’s name (e.g., 苏轼).
- Character Type: Choose calligraphy style (e.g., 行书, 草书, 楷书).
- Chinese Text: Paste or type in Chinese characters, phrases, or full poems you want to download. !!!Only keep Chinese character
-
Start the download:
- Click Start to begin fetching images.
- Progress and logs will be shown in Logs tab.
- Download images are saved into the local images/ folder, organized by character.
-
Manage images:
- Use Delete Images to clear previously download images.
- Use Open File to open the
images/file - Use Save Settings to preserve your current configuration for next time.