mobyvb / tasklist

a tool to keep track of tasks and how long you've been working on them
0 stars 0 forks source link

add state #6

Closed black-crowned-night-heron closed 1 year ago

black-crowned-night-heron commented 1 year ago

I added loadTasksFromFile() and saveTasksToFile() functions to load tasks from a "tasks.dat" file on startup and save tasks back to the same file on shutdown, respectively. Both functions use JSON encoding for persistence. The main() function has been modified to call these functions at the appropriate times, and a "quit" command has been added to exit the loop and perform clean up before the program exits. Task and its fields have been slightly modified to make them exportable and have proper JSON tags.

Resolves #5