Skip to content

VRB95/EmailTrigger_OnFileChange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmailTrigger_OnFileChange

HitCount License: MIT

This present the usage of QFileSystemWatcher Class which monitors the file system for changes to files and directories by watching a list of specified paths. When the file that is monitored is changed in some way, a signal is emited and with the help of smtplib — SMTP protocol client an email is send tot an specific address. For simplicity, an User Interface was created with PyQt4.

screen

Table of Contents

Built With:

Prerequisites

I'll asume you already have installed python 3.x, now install PyQt4. PyQt4 is now deprecated, but you can download the right .whl file for your OS from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4 and use:

 pip install filename.whl

Usage

All the data, like password, sender email, reciver email and so on are stored in a configuration file (*.ini). When the program is started all the data from the config. file are loaded, those data can be alterated to form a new config. file. This is the first step, open the config file whith any txt editor and complet all fields (the path for the file can be completed from UI, so leave it blank for now). After this, sust run:

python main.py

in the repo folder. The UI will apear on screen. Now select the file you want to be monitored and now just... wait? The UI and also the config file have a field for delay. This delay is a "countdown" which start after any modification are made on the watched file, only after all the seconds from the delay spinbox are passed the email is send to a specified address.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature)
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Vesa Bogdan - vesabogdan95@gmail.com

Project Link: https://github.com/VRB95/EmailTrigger_OnFileChange

About

A file watcher which send an email (with or without attachments) when some changes are made on a specific file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages