Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Monitor

Python Tkinter Pygame

📌 Description

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.

🚀 Features

  • 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

📂 Project Structure

file_monitor/
│── file_monitor.py  # Main script
│── config.properties  # Configuration file
│── README.md  # Documentation
│── ring.mp3  # Sample sound
│── requirements.txt  # Dependencies

🛠️ Installation

  1. Clone the repository:

    git clone https://github.com/Cirou/File-Monitor.git
    cd File-Monitor
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the script:

    python file_monitor.py

⚙️ Configuration

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 = 123456789
  • file_path: Path of the file to monitor
  • keywords: Comma-separated keywords
  • alarm_sound: Audio file to play when an alarm is triggered
  • check_interval: Update interval (seconds)
  • memory_lines: Number of lines to keep in memory
  • telegram_token: Your Telegram bot token
  • telegram_chat_id: Your Telegram chat ID

🎮 Usage

  • 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.

📜 License

Distributed under the MIT License.

✨ Author

Created by Cirou 🚀

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages