A basic todo list app that keeps track of tasks. Tasks are tracked on files and will remain between restarts. This system should be portable between all operating systems, but it is only tested and maintained for MacOS.
Lists are stored in [install_directory]/todoLists/
. They are stored in the .csv format and are not encrypted.
Lists are stored with 0664 permissions, such that the owner and group of the owner can read and write, while all other users can read each list. If you wish to change this behavior, you will need to alter the file permission constant in writeList
. Here are some suggested alternatives:
Permission | Owner | Group | Other | Description |
---|---|---|---|---|
0666 | RW | RW | RW | Fully public lists, readable and writeable by anyone. |
0664 | RW | RW | R | Default. Public lists, only writeable by the owner and their group. |
0644 | RW | R | R | Public lists, only writeable by the owner. |
0644 | RW | RW | Readble and writeable by the owner and their group. | |
0640 | RW | R | Readable by the owner and their group, only writeable by owner. | |
0600 | RW | Private lists, only readable and writeable by the owner. |
go build main.go
./main
Whenever prompted for a command, you may run the exit
command to exit safely.
Data processing and file writing is only performed when full operations are ready to complete, so you may also exit at any time a prompt is visible with Ctrl+C
and not risk losing your data.
The first thing you must do is create a list to track your tasks.
- Start the cli with
./main
or any alias you have set up to start the program. - Call the
init
command inside of the cli - Provide the name of the new list when prompted
- You may now exit. Your lists are saved, so you don't have to worry about losing them when you exit.
Lists must be uniquely named, so you will fail to init a list if a name with that list already exists.
Interacting with a list requires having a list selected for commands to run on. You can select a list with the select
command
- Start the cli with
./main
or any alias you have set up to start the program. - Call the
select
command inside of the cli. - Provide the name of the list you want to select. It must be the name of an existing list you have created with the
init
command before. - That list will remain selected until you select a new list or exit the program.
You may perform any of the following operations on your selected list whenever you have one selected:
ls
: Prints all records in that listpush
: Adds a new record to the end of the list.pop
: Removes the latest record from the list and prints it.enqueue
: Adds a new record to the start of the list.dequeue
: Removes an record from the end of the list and prints it.get
: View a single record by index.remove
: View and remove a single record by index.
The following items are expected features that are still in progress:
Queue functionality: support forenqueue
anddequeue
commands.- Editing records
Viewing individual records- Use structs for data rather than raw string slices
- Standardize use of error responses and error handling.
The following items are features that may be implemented in the future, but are not guaranteed:
- Transaction-based editing that requires saving rather than immediately saving all actions
- Deleting lists completely
- Dedicated priority values, rather than a free string, as well as sorting by priority
- Dedicated due date format, rather than a free string, as well as sorting by due date
- Inserting at specific indices
- Compiling command inputs as args to each command, rather than separate inputs