-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate test.a68
73 lines (60 loc) · 2.41 KB
/
generate test.a68
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- coding: utf-8 -*- #
PR include "types/task.a68" PR;
PR include "types/note.a68" PR;
PR include "types/week.a68" PR;
PR include "types/group.a68" PR
PR include "utils.a68" PR;
PROC generate test = VOID: (
[] TASK tasks = (
(1, "Take a shower", "", NIL, pending, today date, (NIL, NIL), today),
(2, "Water plants", "", NIL, done, today date, (NIL, NIL), today),
(3, "Give myself some sunshine", "I've needing more D-vitamine at least I guess so, I'm wetto asf", NIL, pending, today date, (NIL, NIL), today),
(4, "Buy chips", "", NIL, done, today date, (NIL, NIL), today),
(5, "Scriptures Study", "", NIL, pending, today date, (LOC TIME := (11, 0), LOC TIME := (11, 15)), today),
(6, "Lunch", "Eat something healthy", NIL, done, today date, (LOC TIME := (12, 0), NIL), today),
(7, "Free time", "", NIL, done, today date, (LOC TIME := current time, NIL), today),
(8, "Math Study", "Some description for my math class this is a course I purchased yey", NIL, pending, today date, (LOC TIME := (13, 0), NIL), today),
(9, "Portuguese Study", "", LOC STRING := "The teacher canceled for some illness", canceled, today date, (LOC TIME := (15, 0), NIL), today)
);
[] NOTE notes = (
NOTE (10, "It's a note I took in the afternoon after noticing I needed to take a note about what happened today", today date, LOC TIME := (12, 15))
);
[] WEEK weeks = (
WEEK ("My good week 🪴", "This is the week's description that is to remember how I want it to be during the days", get week start)
);
[] GROUP groups = (
GROUP (1, "Some things", today date, (3, 6, 8))
);
FILE f1, f2, f3, f4, f5;
openf(f1, tasks data path, stand out channel);
openf(f2, notes data path, stand out channel);
openf(f3, weeks data path, stand out channel);
openf(f4, groups data path, stand out channel);
openf(f5, last id data path, stand out channel);
putf(f1, ($gl$, task csv header));
putf(f2, ($gl$, note csv header));
putf(f3, ($gl$, week csv header));
putf(f4, ($gl$, group csv header));
put(f5, id OF notes[UPB notes]);
FOR i TO UPB tasks DO
STRING str = task to csv(tasks[i]);
putf(f1, ($gl$, str))
OD;
FOR i TO UPB notes DO
STRING str = note to csv(notes[i]);
putf(f2, ($gl$, str))
OD;
FOR i TO UPB weeks DO
STRING str = week to csv(weeks[i]);
putf(f3, ($gl$, str))
OD;
FOR i TO UPB groups DO
STRING str = group to csv(groups[i]);
putf(f4, ($gl$, str))
OD;
close(f1);
close(f2);
close(f3);
close(f4);
close(f5)
)