https://github.com/bpazy/weatherfor
SMS or email to remind the weather at regular time.
https://github.com/bpazy/weatherfor
sms weather weather-app
Last synced: 4 months ago
JSON representation
SMS or email to remind the weather at regular time.
- Host: GitHub
- URL: https://github.com/bpazy/weatherfor
- Owner: Bpazy
- Created: 2016-11-27T11:30:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-14T06:05:44.000Z (about 8 years ago)
- Last Synced: 2025-01-03T20:12:27.047Z (5 months ago)
- Topics: sms, weather, weather-app
- Language: Java
- Homepage:
- Size: 690 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
WeatherFor
======
SMS or email to remind the weather at regular time.## Attention
Only support chinese cell phone number.## Usage
```
# weatherFor.json
{
"nums": [
{
"num": "18612342345",
"location": "nanjing",
"cron": "* * 7 * * ?"
}
]
}# alidayu.json
{
"appKey": "your appKey",
"appSecret": "your appSecret"
}
```
[cron expression help](http://www.quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-06.html)
## Develop
Implement interface `WeatherClient` to define your weather server.
Implement interface `Message` to define your sms or email setting.Then `App app = new App()` and `app.addSend(new YourMessage())` in `main(String... args)` method.
You can define your `WeatherClient` and `Message` interaction logic in method `App.run()`.Finally, execute `app.run()`.
### Docker
```
vim weatherFor.json // 你的weatherFor配置文件
vim alidayu.json // 你的阿里大于配置文件
docker run -d -v ./weatherFor.json:/home/gradle/WeatherFor/weatherFor.json \
-v ./alidayu.json:/home/gradle/WeatherFor/weatherFor.json \
hanziyuan08/weatherfor
```