-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.mad
57 lines (52 loc) · 1.24 KB
/
Main.mad
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
53
54
55
56
57
import { DateTime, toISOString } from "Date"
import Dict from "Dictionary"
import { noop } from "Function"
import IO from "IO"
import List from "List"
import Math from "Math"
import { fromMaybe } from "Maybe"
import Wish from "Wish"
import Jam from "Jam"
import Date from "@/Date"
import D from "@/Diurnal"
import Task from "@/Task"
main = () => {
pipe(
Jam.ensure($, ""),
map(IO.pTrace("ensured!")),
map(
pipe(
Jam.value,
D.parse,
D.aggregateTopics,
),
),
/*
map(
pipe(
Dict.get("running"),
IO.pTrace("running?"),
fromMaybe([]),
map(where { #[d, _] => d }),
Date.bounds,
where {
#[least, most] =>
#[Date.toDate(least), Date.toDate(most)]
},
),
),
*/
map(Task.summarizeByTopic),
Wish.fulfill(
pipe(
IO.pTrace("BARF!"),
noop,
),
pipe(
// IO.pTrace("READ!"),
IO.put,
noop,
),
),
)("./dayfile.csv")
}