aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 1c8c800eafd63d827d57e1ec598213106a4d176f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Birthday
========

Notify by email if there is a birthday today. This program is intended to be
launched everyday.

Usage
-----

Create birthdates.csv which stores birthdates:

```
23 Oct 1982,     Katie, Clarke
30 Jan 1955,     Henry, Brown
08 May 1980, Alexander, Khan
02 Aug 1976,    Violet, Koval
02 Aug 1976,      Jude, Martinez

```

Create config.txt:

```
mail-to = john.dupont@mail.com
mail-from = no-reply@service.com
day-for-next-week-notification = Friday
```

Launch the following commands:

```
cabal sandbox init
cabal instal --only-dependencies
cabal build
./dist/build/birthday/birthday
```

Notification
------------

Notification are in plan english so that it is more friendly to read them. Here
is an example notification with 3 birthdays today and 2 birthdays next week:

### Mail subject

“Hey, there are 3 birthdays today and there will be 2 birthdays next week!”

### Mail body

“Today, Katie Clarke is 19 years old, Henry Brown is 34 years old and Alexander
Khan is 22 years old. Next week, Violet Koval will be 65 years old and Jude
Martinez will be 12 years old.”