#include <stdlib.h>
#include <string.h>
+#include "note.h"
char *task_exec(char *opts)
{
json = json_object_object_get(jtask, "uuid");
tasks[i]->uuid = strdup(json_object_get_string(json));
- tasks[i]->note = NULL;
+ tasks[i]->note = note_get(tasks[i]->uuid);
}
tasks[n] = NULL;
free(str);
free(opts);
}
+
+void tw_done(const char *uuid)
+{
+ char *opts;
+
+ opts = malloc(1
+ + strlen(uuid)
+ + strlen(" done")
+ + 1);
+ sprintf(opts, " %s done", uuid);
+
+ task_exec(opts);
+
+ free(opts);
+}