write command #3

Merged
merged 1 commit into from Feb 4, 2012

Conversation

Projects
None yet
3 participants
Contributor

sirkitree commented Feb 4, 2012

Introduces the
todo write
command.

I've added a write command to my version which by default outputs the formatted items to ~/todo.txt

Originally I wanted to display my todo list through geektool on my desktop, and couldn't seem to get geektool to successfully get the output of 'todo ls'.

Now I just have geektool set to 'cat ~/todo.txt' and write to the file when I want it updated with 'todo write ~/todo.txt'

Next step is to see if I can automatically chain commands, calling command.write after any command that changes the list.

Contributor

sirkitree commented Feb 4, 2012

Sorry, but my editor also removed a bunch of whitespace endings.

vesln added a commit that referenced this pull request Feb 4, 2012

@vesln vesln merged commit 530ad51 into vesln:master Feb 4, 2012

Owner

vesln commented Feb 4, 2012

+1 keep up the good work

Owner

vesln commented Feb 4, 2012

Can you also provide some tests?

Owner

vesln commented Feb 4, 2012

Also we can rename the command to export, which i think is way more clear what it does.

Contributor

sirkitree commented Feb 4, 2012

Hrm, I'll give it a shot - haven't learned much on that front yet.

@sebastialonso sebastialonso referenced this pull request Jul 21, 2015

Closed

Add todo edit #20

+ });
+ fs.writeFile(filename, data, 'utf8', function(err, written) {
+ if (err) return console.log(err);
+
@d48

d48 Jul 21, 2015

Contributor

I would log that write was successful if no error.

Contributor

d48 commented Jul 21, 2015

  • +1 on renaming method to export.
  • Add to help menu that it exports current todo list items to filename or ~/todo.txt by default.
  • +1 on adding tests
Contributor

d48 commented Jul 21, 2015

great start so far!

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