X-Git-Url: https://git.danieliu.xyz/?p=taskasaur.git;a=blobdiff_plain;f=taskasaur.c;h=50b72d4ab43c7769f834c1895463dd456fede760;hp=2097e63cc1c64bbe110f1c285dc4b867dd463a66;hb=8fb19bb7969617821e9c2c1c64d113ff2c26abaf;hpb=7c9d33c1eb0eb97911c7d1cd073cb70b53dedf62 diff --git a/taskasaur.c b/taskasaur.c index 2097e63..50b72d4 100644 --- a/taskasaur.c +++ b/taskasaur.c @@ -7,7 +7,33 @@ main(int argc, char** argv) board = begin_parse("test_board.md"); - printf("%d\n", board->todolist_count); + for (int i = 0; i < board->todolist_count; i++) { + TodoList* todolist; + printf("List =-=-=-=-=-==-=-=-=-=-=-\n"); + todolist = board->todolist_list[i]; + printf("List name: %s\n", todolist->list_name); + printf("Num of items: %d\n", todolist->item_count); + + for (int j = 0; j < todolist->item_count; j++) { + TodoItem* todoitem; + printf("Item =-=-=-=-=-\n"); + todoitem = todolist->item_list[j]; + printf("Item name: %s\n", todoitem->item_name); + printf("Description: %s\n", todoitem->description); + printf("Num of subtasks: %d\n", todoitem->subtask_count); + + for (int k = 0; k < todoitem->subtask_count; k++) { + SubTask* subtask; + int done; + + subtask = todoitem->subtask_list[k]; + printf("Subtask: %s, %d\n", subtask->subtask_name, subtask->done); + } + } + + } + /* printf("%d\n", board->todolist_count); */ + /* printf("%s\n", board->todolist_list[1]->list_name); */ return 0; }