beauraines / rtm-cli

Remember the Milk Command Line Interface
MIT License
2 stars 0 forks source link

Add support for adding notes #23

Closed beauraines closed 1 year ago

beauraines commented 1 year ago

Add the ability to add notes to a task, similar to how gh opens the EDITOR.

This is to cover dwaring87/rtm-cli/issues/19

See https://stackoverflow.com/questions/9122282/how-do-i-open-a-terminal-application-from-node-js for some sample code

const child_process = require('child_process')
var editor = process.env.EDITOR || 'vi';

var child = child_process.spawn(editor, ['/tmp/somefile.txt'], {
    stdio: 'inherit'
});

child.on('exit', function (e, code) {
    console.log("finished");
});

It looks like a new method needs to be added to the rtm-api tasks and tasks helpers. RTM's API has to use rtm.tasks.notes.add.rtm