File Monitor is a Python application with a graphical user interface (GUI) designed to monitor a log file in real time. The program continuously checks for newly added lines and triggers an alarm if specific keywords are detected.
- Real-time monitoring of a text file
- Simple user interface with Tkinter
- Sound notifications when keywords are detected
- Saves and loads settings from
config.properties - Allows selection of file and alarm sound
- Sends Telegram notifications when keywords are detected
file_monitor/
│── file_monitor.py # Main script
│── config.properties # Configuration file
│── README.md # Documentation
│── ring.mp3 # Sample sound
│── requirements.txt # Dependencies
-
Clone the repository:
git clone https://github.com/Cirou/File-Monitor.git cd File-Monitor -
Install dependencies:
pip install -r requirements.txt
-
Run the script:
python file_monitor.py
The config.properties file contains the settings:
[Settings]
file_path = file.txt
keywords = these, are, examples
alarm_sound = ring.mp3
check_interval = 1
memory_lines = 10
telegram_token = 123456789:ABCdefGhIJKlmnoPQRstuVWxyZ
telegram_chat_id = 123456789file_path: Path of the file to monitorkeywords: Comma-separated keywordsalarm_sound: Audio file to play when an alarm is triggeredcheck_interval: Update interval (seconds)memory_lines: Number of lines to keep in memorytelegram_token: Your Telegram bot tokentelegram_chat_id: Your Telegram chat ID
- Launch the application.
- Select the file to monitor.
- Set the keywords.
- Press Start Monitoring to begin monitoring.
- The program will notify with a sound and a Telegram message if keywords are detected.
Distributed under the MIT License.
Created by Cirou 🚀