A Python-based CLI tool that helps users track their wake-up routines. It acts as an alarm clock and automatically fetches the day's local weather upon waking up, securely logging your daily wake-up times and environment data.
- Standalone Alarm Thread: Set your alarm without freezing the program's main interface.
- Data Autosave: Automatically logs your wake-up date, time, city, and weather (Temperature + Status) into
data/user_logs.csvas soon as you stop the alarm. - Editable Settings: On the first run, it saves your city and ringtone preferences into
data/settings.json. These can be easily updated anytime from the main menu.
- Python: The core engine (v3.13).
- OOP: Implemented for better scalability, isolation, and organization.
- Multithreading: Ensures the alarm waiting process don't interrupt the CLI flow.
- JSON & CSV: Lightweight databases for user settings and historical logs.
- APIs: Integrated with OpenWeatherMap for weather info fetching.
- Modules:
- requests: for weather API requests.
- datetime: to handle time and date.
- time: to implement the sleep() function.
- json and csv: to save settings and logs.
- threading: to handle the alarm thread alongside program's main thread.
- msvcrt: to clear the stdin buffer.
- os: to remove any unnecessary output in the terminal, (path): to handle file paths.
- sys: to safely quit from the program.
- pygame (mixer): to handle program audio.
- Clone the repository:
git clone https://github.com/blazusta/RingWeather.git cd RingWeather - Install Requirements
pip install -r requirements.txt
- API Key Setup
- Get a free API key from https://openweathermap.org/
- Rename
.env.exampleto.env. - Put your actual API key inside it and save.
- Run The Program
python main.py
RingWeather/
├── main.py
├── README.md
├── requirements.txt
├── LICENSE
├── .gitignore
├── .env.example
│
├── modules/
│ ├── __init__.py
│ ├── weather_api.py
│ ├── storage.py
│ └── alarm.py
│
├── data/
│ ├── settings.json
│ └── user_logs.csv
│
└── assets/
├── Alarm1.mp3
├── Alarm2.mp3
├── Alarm3.mp3
├── Alarm4.mp3
└── Alarm5.mp3