Skip to content

Commit 787d201

Browse files
author
tom
committed
readme
1 parent 2011cc6 commit 787d201

4 files changed

Lines changed: 148 additions & 119 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -20,57 +20,7 @@
2020
- 🏠 **Native OS Scheduling** — uses `cron` on Linux, `Task Scheduler` on Windows (no background process needed on windows, on linux it will need an application open on the user to run the tasks)
2121
- 🎨 **Themes** — multiple dark/light themes
2222

23-
---
24-
25-
## ⚡ Quick Start
26-
27-
### Option A: Download Pre-built Executable *(Recommended)*
28-
29-
1. Download the latest release from the [Releases page](https://github.com/juke32/PyCronVideoAlarm/releases)
30-
2. Extract the folder anywhere you want the app to live permanently
31-
3. Run the executable:
32-
- **Windows**: `PyCronVideoAlarm_Windows.exe`
33-
- **Linux**: `./PyCronVideoAlarm_Linux` (may need: `chmod +x PyCronVideoAlarm_Linux`)
34-
4. On first run, go to **Settings → Add to Applications** to register it in your app launcher
35-
36-
> [!TIP]
37-
> **Keep the folder in one place.** Cron/Task Scheduler entries point to this exact path. Moving the exe after setting alarms will break the schedule links.
38-
39-
### Option B: Run from Source
40-
41-
```bash
42-
git clone https://github.com/juke32/PyCronVideoAlarm.git
43-
cd PyCronVideoAlarm
44-
python3 -m venv .venv
45-
source .venv/bin/activate # Linux
46-
# .venv\Scripts\activate.bat # Windows
47-
pip install -r requirements.txt
48-
python src/main.py
49-
```
50-
51-
---
5223

53-
## 📦 Dependencies
54-
55-
### External (install separately)
56-
57-
| Dependency | Purpose | Linux | Windows |
58-
|---|---|---|---|
59-
| **MPV (Linux)** | Video & audio playback | `sudo apt install mpv` | - |
60-
| **VLC (Windows)** | Video & audio playback | - | [videolan.org](https://www.videolan.org/vlc/) or `winget install VideoLAN.VLC` |
61-
62-
### Python (auto-installed via `requirements.txt`)
63-
64-
| Package | Purpose |
65-
|---|---|
66-
| `Pillow` | Image handling / icon display |
67-
| `python-crontab` | Linux cron scheduling *(Linux only)* |
68-
| `jeepney` | DBus / Wayland support *(Linux only)* |
69-
| `pycaw`, `comtypes`, `pywin32` | Windows audio + Task Scheduler *(Windows only)* |
70-
| `pyautogui`, `opencv-python` | Screen automation actions |
71-
| `sounddevice`, `numpy`, `scipy` | Audio recording action |
72-
73-
---
7424

7525
## 📂 Folder Structure
7626

@@ -101,81 +51,17 @@ PyCronVideoAlarm/
10151
10252
---
10353

104-
## 🐧 Linux Setup
105-
106-
### Make it executable
107-
```bash
108-
chmod +x PyCronVideoAlarm_Linux
109-
./PyCronVideoAlarm_Linux
110-
```
111-
112-
### Crontab access
113-
The app schedules alarms via cron. Test access with:
114-
```bash
115-
crontab -l
116-
# "no crontab for user" = you have access (just no entries yet)
117-
# "permission denied" = run: echo $USER | sudo tee -a /etc/cron.allow
118-
```
119-
120-
> [!CAUTION]
121-
> Never run the app or set alarms with `sudo`. Cron jobs set as root cannot access your display or audio session.
122-
123-
### Brightness control
124-
Install `brightnessctl` for the most reliable brightness support:
125-
```bash
126-
sudo apt install brightnessctl
127-
```
128-
Or add your user to the `video` group:
129-
```bash
130-
sudo usermod -aG video $USER # log out and back in after
131-
```
132-
133-
### Session requirement
134-
Your user session must be **logged in** for media to play. The app automatically injects `DISPLAY` and `XDG_RUNTIME_DIR` into cron commands for GUI playback.
135-
136-
For full Linux details (Fedora, udev rules, codecs, sleep inhibition): see [README_Linux.md](./README_Linux.md)
137-
138-
---
139-
140-
## 🪟 Windows Setup
141-
142-
1. Download and run `VideoAlarm_Windows.exe`
143-
2. Install VLC: `winget install VideoLAN.VLC` or from [videolan.org](https://www.videolan.org/vlc/)
144-
3. Alarms are registered in **Windows Task Scheduler** — no background process needed
145-
4. Go to **Settings → Add to Start Menu** to add a shortcut
146-
147-
> [!NOTE]
148-
> Windows can wake from sleep to fire an alarm if configured in Task Scheduler (enabled by default in the app).
149-
150-
---
151-
152-
## 🛠️ Troubleshooting
54+
## 📖 Installation Guides
15355

154-
| Problem | Solution |
155-
|---|---|
156-
| Alarm didn't fire | Check the **Next Alarm** ticker in the Alarms tab. Verify cron/Task Scheduler using a 1-minute test alarm. |
157-
| Video won't play | Ensure MPV (Linux) or VLC (Windows) is installed. |
158-
| No sound | On Linux, check `XDG_RUNTIME_DIR` is set. The app logs this on each alarm run. |
159-
| App won't open on Linux | Run `chmod +x VideoAlarm_Linux` then try again |
160-
| Brightness control fails | Install `brightnessctl` or add user to `video` group (Linux) |
56+
Choose your operating system for detailed installation and setup instructions:
16157

162-
Enable **Settings → Logging** and check the logs folder for detailed error output.
58+
- **[🪟 Windows Setup Guide](./README_Windows.md)**
59+
- **[🐧 Linux Setup Guide](./README_Linux.md)**
60+
- **[🍎 macOS Setup Guide](./README_macOS.md)**
16361

16462
---
16563

166-
## 🏗️ Building from Source
16764

168-
```bash
169-
# Linux
170-
./build_linux.sh
171-
172-
# Windows
173-
build_windows.bat
174-
```
175-
176-
Or push a commit whose message **starts with** `build` to trigger GitHub Actions (builds both platforms automatically).
177-
178-
---
17965

18066
## 🤝 Contributing & Support
18167

‎README_Linux.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,27 @@ sudo dnf install at && sudo systemctl enable --now atd
105105
2. **Keep Awake** — the app window must be open to actively block system sleep.
106106
3. **Display injection** — the app automatically sets `DISPLAY` and `XDG_RUNTIME_DIR` in cron commands so playback works from background triggers.
107107
4. **Moving the executable** — if you move the exe after setting alarms, update the crontab entries or re-set the alarms from the app.
108+
109+
---
110+
111+
## 🛠️ Troubleshooting
112+
113+
| Problem | Solution |
114+
|---|---|
115+
| Alarm didn't fire | Check the **Next Alarm** ticker in the Alarms tab. Verify cron using a 1-minute test alarm. |
116+
| Video won't play | Ensure MPV is installed (`sudo apt install mpv`). |
117+
| No sound | Check `XDG_RUNTIME_DIR` is set. The app logs this on each alarm run. |
118+
| App won't open | Run `chmod +x PyCronVideoAlarm_Linux` then try again |
119+
| Brightness control fails | Install `brightnessctl` or add user to `video` group |
120+
121+
Enable **Settings → Logging** and check the logs folder for detailed error output.
122+
123+
---
124+
125+
## 🏗️ Building from Source
126+
127+
```bash
128+
./build_linux.sh
129+
```
130+
131+
Or push a commit whose message **starts with** `build` to trigger GitHub Actions.

‎README_Windows.md‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Windows Setup & Installation Guide
2+
3+
Detailed Windows-specific setup for **PyCron Video Alarm Manager**.
4+
5+
---
6+
7+
## 📦 Prerequisites
8+
9+
1. **VLC Media Player**: Required for reliable media playback on Windows.
10+
- Install via Winget: `winget install VideoLAN.VLC`
11+
- Or download from [videolan.org](https://www.videolan.org/vlc/)
12+
13+
## 🚀 Setting Up the Application
14+
15+
### Using the Pre-built Executable
16+
1. Download `PyCronVideoAlarm_Windows.exe` from the latest release.
17+
2. Place the executable in a permanent folder (e.g., `C:\VideoAlarm`). Moving the executable later will break existing scheduled alarms, as the Task Scheduler points to the exact file path.
18+
3. Run the application. On first run, it will automatically create the necessary data folders (`sequences`, `audio`, `video`, `logs`).
19+
20+
### Running from Source
21+
If you prefer not to use the pre-built executable:
22+
```cmd
23+
git clone https://github.com/juke32/PyCronVideoAlarm.git
24+
cd PyCronVideoAlarm
25+
python -m venv .venv
26+
.venv\Scripts\activate.bat
27+
pip install -r requirements.txt
28+
python src/main.py
29+
```
30+
31+
## ⏰ Task Scheduler Integration
32+
Alarms on Windows are registered directly in the **Windows Task Scheduler**.
33+
- You do not need the app running in the background for alarms to trigger.
34+
- Windows can automatically wake from sleep to fire an alarm (this is enabled by default in the app settings, provided your hardware/BIOS supports wake timers).
35+
36+
## 🛠️ Integration & Shortcuts
37+
- To easily access the application, open the app and go to **Settings → Add to Start Menu** to create a shortcut.
38+
39+
---
40+
41+
## 🛠️ Troubleshooting
42+
43+
| Problem | Solution |
44+
|---|---|
45+
| Alarm didn't fire | Check the **Next Alarm** ticker in the Alarms tab. Verify Task Scheduler using a 1-minute test alarm. |
46+
| Video won't play | Ensure VLC is installed (`winget install VideoLAN.VLC`). |
47+
48+
Enable **Settings → Logging** and check the logs folder for detailed error output.
49+
50+
---
51+
52+
## 🏗️ Building from Source
53+
54+
```cmd
55+
build_windows.bat
56+
```
57+
58+
Or push a commit whose message **starts with** `build` to trigger GitHub Actions.

‎README_macOS.md‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# macOS Setup & Installation Guide
2+
3+
Detailed macOS-specific setup for **PyCron Video Alarm Manager**.
4+
5+
> [!NOTE]
6+
> Pre-built applications are not yet supported for macOS. You must run the application from source.
7+
8+
---
9+
10+
## 📦 Prerequisites
11+
12+
1. **MPV or VLC Media Player**: Required for reliable media playback.
13+
- Install via Homebrew:
14+
```bash
15+
brew install mpv
16+
```
17+
or
18+
```bash
19+
brew install --cask vlc
20+
```
21+
22+
2. **Python 3**:
23+
- Install via Homebrew: `brew install python`
24+
25+
## 🚀 Setting Up the Application
26+
27+
### Running from Source
28+
Currently, macOS relies on running from the Python source:
29+
30+
```bash
31+
git clone https://github.com/juke32/PyCronVideoAlarm.git
32+
cd PyCronVideoAlarm
33+
python3 -m venv .venv
34+
source .venv/bin/activate
35+
pip install -r requirements.txt
36+
python3 src/main.py
37+
```
38+
39+
## ⏰ Scheduling Alarms
40+
On macOS, scheduling relies on the underlying `cron` daemon.
41+
42+
- Alarms are created as standard cron jobs inside your user's crontab.
43+
- Ensure your Terminal (or the IDE/app running Python) has **Full Disk Access** in **System Settings > Privacy & Security > Full Disk Access** so it can modify the crontab without permission errors.
44+
- Test your terminal's crontab access:
45+
```bash
46+
crontab -l
47+
```
48+
49+
## 😴 Sleep and Power Settings
50+
- Alarms require the system to be awake to execute properly. You may need to adjust your Energy Saver/Displays settings or use a tool like Amphetamine if you want alarms to trigger without the Mac sleeping fully.
51+
52+
---
53+
54+
## 🛠️ Troubleshooting
55+
56+
| Problem | Solution |
57+
|---|---|
58+
| Alarm didn't fire | Check the **Next Alarm** ticker in the Alarms tab. Verify your terminal has Full Disk Access for crontab. |
59+
| Video won't play | Ensure MPV or VLC is installed via Homebrew. |
60+
61+
Enable **Settings → Logging** and check the logs folder for detailed error output.

0 commit comments

Comments
 (0)