A powerful birthday reminder system that supports both lunar and solar calendar birthdays, providing rich Chinese traditional culture information.
[中文文档] [English Doc]
-
Dual Calendar Support
- Support for solar (Gregorian) birthday reminders
- Support for lunar (Chinese) birthday reminders
- Smart handling of leap months
-
Rich Date Information
- Display GanZhi (Heavenly Stems and Earthly Branches) for year, month, day, hour
- Display Chinese Zodiac
- Display lunar festivals
- Display solar festivals
- Display 24 solar terms
- Display weekday information
- Display constellation
-
Flexible Reminder Settings
- Customizable advance reminder days
- Multiple recipient support
- Email notifications
- Email preview functionality
- Preview email
- Default settings
- GitHub Actions support
- Docker deployment
- Multiple notification sources (email, ServerChan)
Create a config.yml file in the project root directory (refer to config.example.yml)
git clone https://github.com/wllzhang/BirthdayRS.git
cd BirthdayRS
# Install dependencies
pip install -r requirements.txt
# Local run
python -m src.main run
python -m src.main previewpython -m src.main --help
python -m src.main preview --help
python -m src.main run
python -m src.main validate --config config.yml
python -m src.main info --config config.yml- Fork the repository, set the variable
BIRTHDAY_YAMLin Settings with the content of your config.yaml - Go to Actions and run the action:
Daily Birthday Check
latest: Latest stable versionvX.Y.Z: Specific version (e.g., v1.0.0)sha-XXXXXX: Build for a specific commit
# Run birthday reminder
docker run -v ${PWD}/config.yml:/app/config.yml ghcr.io/wllzhang/birthdayrs:latest run
docker run -v ${PWD}/config.yml:/app/config.yml -v ${PWD}/previews:/app/previews ghcr.io/wllzhang/birthdayrs:latest previewThe system uses the Jinja2 template engine to render email content and supports custom email templates. The default template is located at templates/birthday.html and includes:
- Basic birthday information
- Lunar date information
- GanZhi (Heavenly Stems and Earthly Branches) for year, month, day, hour
- Zodiac and constellation
- Festival and solar term information
- Weekday information
Run tests:
pytestMIT License
System logs are saved in the birthday_reminder.log file, including:
- Configuration loading status
- Birthday check results
- Email sending status
- Error messages (if any)
This project uses GitHub Actions for a complete CI/CD pipeline:
Each push or Pull Request will automatically run the following checks:
-
Code Testing
- Run unit tests
- Generate test coverage report
- Save test results as artifacts
-
Code Quality
- Code style check with flake8
- Ensure code follows PEP 8 standards
-
Docker Image Build
- Automatically build Docker image
- Push to GitHub Container Registry
-
Daily Check
- Automatically run birthday checks every day
- Send reminder emails
- Support for development and production environments
-
Docker Deployment
- Quick deployment via Docker
- Latest version image available
- README Auto-update
- Automatically update repository links in documentation
- Keep documentation in sync with code