-
Notifications
You must be signed in to change notification settings - Fork 0
/
pseudo_code
120 lines (96 loc) · 2.19 KB
/
pseudo_code
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// pseudocode for the many functions needed to create the kanban app
using std::filesystem;
vector<string> directoryList;
vector<tab> tabs;
int main(
{
// summary: all variables are initialized and the main process is started
daysIntoTabs();
}
void daysIntoTabs()
{
// summary: reads the current directory for all subdirectories containing days and then turns each day into a tab
for (auto& p: filesystem::recursive_directory_iterator(./);)
{
if (p.isDirectory())
{
if (p.name.Contains("Assigned"))
{
string folderName = p.name
folderName.Erase(folderName.find("Assigned "));
directoryList.push_back(folderName);
}
}
}
// creates all the necessary tabs per day
createTabs(directoryList.size);
foreach(tab in tabs)
{
createTableItems(tab);
}
}
function CreateTableItems(tab currentTab)
{
// summary: read the contents of tab and output as a label item
bool newlabel = false;
bool primedForDescription = false;
item currentItem;
string descriptionContent;
for (string line; getline( input, line );)
{
if (!primedForDescription)
{
switch (p)
{
case (isEmpty())
break;
// just skip if empty
case (isLine)
{
// create a new label if this is the first divider in an entry
if (currentlyMakingNewLabel.isTrue())
currentTab.items.push_back(currentItem);
currentItem.ClearAll();
currentlyMakingNewLabel= false;
else
currentlyMakingNewLabel = true;
break;
}
case (FROM)
{
primedForDescription = true;
currentItem.SetName(p.Erase(p.find("FROM:"));
break;
}
case (STATUS)
{
currentItem.setMTT = p.find("MOVEDTOTOMORROW").isTrue();
unsigned first = p.find("STATUS:");
currentItem.SetStatPrimary(p.erase(p.find("STATUS:"));
}
case (PRIORITY)
{
currentItem.SetPriority(p.erase(p.find("PRIORITY:"));
}
}
}
// if primed to build the item description, check if the line is the status line. if not, add the line to the description
else
{
if (p == STATUS)
{
primedForDescription = false;
}
else
{
descriptionContent.append(p + "\n");
}
}
}
}
function sortPriority()
{
}
function sortStatus()
{
}