Giter Club home page Giter Club logo

whatsnew's Introduction

What's New

This repository contains code that implements a program that sends email messages to an IMAP server. The messages are sent to notify a user that there is something new. This repository has two example messages that can be sent. The default message is to send the public IP address of the host whenever it changes or once a day. The other message is a file name, sent whenever a new file appears in a monitored directory. This second example will also copy the file to a remote server and remove files from that server that have been there longer than a configured period.

Users of this repository can derive other classes from the whatsnew class to perform the task they are interested in. The method "task" must be defined by the derived class, a getInstance method must be defined, the constructor and destructor need to be private, and the copy/assign constructors must be deleted. The derived class is a singleton. If the users of this repository create a derived class using one of the two examples, the only required change to the whatsnew.cc source is modifying the creation of the instance object to match the class written.

The IMAP server and mailbox can be configured in the CMakeLists.txt file. Do not commit a modified version of this file to your cloned copy of this repository. It will contain authentication information for accessing an email account.

Installation (assuming a Debian/Raspbian buster or better Linux distribution)

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install git
  4. sudo apt-get install build-essential
  5. sudo apt-get install cmake
  6. sudo apt-get install libcurl4-gnutls-dev
  7. sudo apt-get install dnsutils
  8. git clone https://github.com/mbroihier/whatsnew
    • cd whatsnew
    • mkdir build
    • vi CMakeLists.txt and modify parameters discussed above
    • cd build
    • cmake ..
    • make
  9. if you want whatsnew to run as a service
    • vi whatsnew.service - modify to point to your local paths
    • vi whatsnewWrapper - modify to point to your local paths
  10. sudo cp -p whatsnew.service /lib/systemd/system/
  11. sudo systemctl enable whatsnew.service
  12. sudo systemctl start whatsnew.service

whatsnew's People

Contributors

mbroihier avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.