Skip to content

Conversation

@preist
Copy link
Owner

@preist preist commented Jun 20, 2018

Command line todo list

Description

Write an command line application that helps you manage your tasks.

The information can be stored in any prefered way. The program should be launched from the console with different attributes:

	-a or --add		adds an item into the list
	-l or --list		displays the list
	-r or --remove		removes the last n in the list
	-c or --clear		clears the list
	-h or --help		shows list of available commands

@preist preist self-assigned this Jun 20, 2018
@preist
Copy link
Owner Author

preist commented Jun 20, 2018

Short demo:

terminal_todo_app

@preist preist requested a review from vlebedeff June 21, 2018 07:44
desc "-a or --add [TASK]", "Adds an item into the list of tasks"
map %w[-a --add] => :add
def add(task)
@store.tasks = @store.tasks << task
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe provide add_task or something in the store object so that the UI layer is kept as think as possible

return
end

shell.say "\n\"\e[1m#{tasks.delete_at(item.to_i - 1)}\"\e[0m [removed]\n\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should separate the business logic from showing messages to user to make the presentation logic less invasive

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also could be cool to provide some kind of helper that removes the noise from using color codes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants