Giter VIP home page Giter VIP logo

todo's Introduction

todo

todo is a small command line todo list program. It was tested with Go 1.11 on Ubuntu 18.04 LTS running on Windows Subsystem for Linux (WSL). You can download and install Go by following the installation instructions.

Installation

go get github.com/wilsjame/todo

About

NAME
	todo - an interactive todo list

SYNOPSIS
	todo [-a=add] [-r=remove] item

DESCRIPTION
	todo creates todo.txt in the same directory and 
	adds and removes items to and from todo.txt.
	Run todo with no arguments to display todo.txt. 
	New todos are automatically assigned an ID.

OPTIONS
	-a string
		Add a todo.
	-r int
		Remove a todo by specifying its ID.

EXAMPLES
	todo  
		Display todo.txt.

	todo -a practice
		Add a todo.

	todo -a "vote for pedro"
		Add a longer todo.

	todo -r 1
		Remove todo with ID number 1.

todo's People

Contributors

wilsjame avatar

Watchers

James Cloos avatar

todo's Issues

Inexplicit state creates race condition, fails user in achieving sole program purpose

Let's say I have two terminals open.

In one terminal I do:

./todo
1 something
2 otherthing

In another terminal I do:

./todo -r 1

Now there is only 1 otherthing remaining.

I close the second terminal, walk away, and return.

Forgetting I had run that, with the output of the first terminal's command still in front of me, I run:

./todo -r 1

... in order to remove 1 something.

Instead of doing so, however, it removes 2 otherthing which is now known as 1 otherthing.

This is a problem because it causes a silent failure to recall the item, which is the sole and whole purpose of the program.

I would suggest either assigning a static ID when inserting, deriving the ID from the string, or using a lightweight DB like sqlite in order to manage ID assignment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.