CDC Noticeboard on Your Mail: Where Automatic Updates Turn Chaos into Pleasure!
Report Bug
·
Request Feature
MFTP continuously monitors the CDC Noticeboard and forwards incoming notices to the configured email address, whether it’s an individual account or a Google Group. It is also available as a service and as a cronjob on linux systems along with a heath checkup utility to monitor and notify for any errors.
[!Warning]
This tool is completely legal, but the way you use it can get you into legal trouble. Some things you cannot do are:
- Use this tool to send CDC notifications to any non-KGPian.
- Use this tool on a wide scale or publicise its running instance without consent from the Placement Committee.
Please use this tool responsibly and within ethical and legal bounds. We do not promote violating company policies or laws. The extent of the punishment may very from disciplinary action by the institute to blacklisting from CDC process.
To set up a local instance of the application using docker, follow the steps below.
The following requirements are to be satisfied for the project to function properly:
git clone https://github.com/metakgp/mftp
cd mftp
It is mandatory to provide all of the following env variables before the docker-compose command.
MFTP_CONFIG: Absolute path to mftp_config directoryDOCTOR_CONFIG: Absolute path to doctor_config directoryMFTP_MODE: Mode of sending mail - –smtp, –gmail-api or –ntfyundefinedsudo MFTP_CONFIG=/path/to/mftp_config DOCTOR_CONFIG=/path/to/doctor_config MFTP_MODE="--smtp" docker-compose up -d # Using SMTP for sending mails
sudo MFTP_CONFIG=/path/to/mftp_config DOCTOR_CONFIG=/path/to/doctor_config MFTP_MODE="--gmail-api" docker-compose up -d # Using Gmail API for sending mails
sudo MFTP_CONFIG=/path/to/mftp_config DOCTOR_CONFIG=/path/to/doctor_config MFTP_MODE="--ntfy" docker-compose up -d # Using NTFY for serving notifications
[!NOTE]
There also isDOCTOR_MODEas one of the environment variables, which is optional and considers one value only--cron. We will use it in the sub-section just next.
It is also possible to run these docker containers as a cronjob:
restart: unless-stopped in docker-compose.yml --cron into the MFTP_MODE env variable and set DOCTOR_MODE to --cron as well. As follows:
sudo MFTP_CONFIG=/path/to/mftp_config DOCTOR_CONFIG=/path/to/doctor_config MFTP_MODE="--smtp --cron" DOCTOR_MODE="--cron" docker-compose up -d
sudo MFTP_CONFIG=/path/to/mftp_config DOCTOR_CONFIG=/path/to/doctor_config MFTP_MODE="--gmail-api --cron" DOCTOR_MODE="--cron" docker-compose up -d
sudo MFTP_CONFIG=/path/to/mftp_config DOCTOR_CONFIG=/path/to/doctor_config MFTP_MODE="--ntfy --cron" DOCTOR_MODE="--cron" docker-compose up -d
To set up a local instance of the application without using docker, follow the steps below.
bashzsh*nix[GNU+Linux and Unix]The following requirements are to be satisfied for the project to function properly:
Now that the environment has been set up and configured to properly compile and run the project, the next step is to download and configure the project locally on your system.
git clone https://github.com/metakgp/mftp
cd mftp
pip3 install -r requirements.txt
cd service/
./configure-service.sh
After configuring MFTP as a service, you can use the mftp command with several options to interact with the tool as a service.
Following is the help menu for the service.
Usage: mftp [COMMAND] [OPTIONS]
Command:
-h, --help Display this help and exit
logs [OPTIONS] Display last 25 lines of mftp log file
Options:
clear Clear the mftp log file
NUM Display last NUM lines of mftp log file
disable Disable mftp service
enable Enable mftp service
status Check status of mftp service
restart Restart mftp service
stop Stop mftp service
start Start mftp service
cronjob [OPTIONS] Use mftp as a cronjob
Options:
enable [NUM] Enable mftp cronjob after every NUM minutes (default is 2 minutes)
disable Disable mftp cronjob
status Check status of mftp cronjob
doctor [OPTIONS] Use mftp doctor as a cronjob
Options:
enable [NUM] Enable doctor cronjob after every NUM minutes (default is 2 minutes)
disable Disable doctor cronjob
status Check status of doctor cronjob
logs [OPTIONS] Display last 25 lines of doctor log file
Options:
clear Clear the doctor log file
NUM Display last NUM lines of doctor log file
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.