@beauraines/rtm-cli 1.7.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +36 -33
- package/package.json +2 -2
- package/src/cmd/start.js +82 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.8.0](https://github.com/beauraines/rtm-cli/compare/v1.7.3...v1.8.0) (2023-03-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* Add ability to set/update start time ([#32](https://github.com/beauraines/rtm-cli/issues/32)) ([814064f](https://github.com/beauraines/rtm-cli/commit/814064fa7c75fed621c84fd06e022140df7577aa)), closes [beauraines/rtm-cli#16](https://github.com/beauraines/rtm-cli/issues/16)
|
|
11
|
+
|
|
12
|
+
### [1.7.3](https://github.com/beauraines/rtm-cli/compare/v1.7.2...v1.7.3) (2023-03-12)
|
|
13
|
+
|
|
14
|
+
### [1.7.2](https://github.com/beauraines/rtm-cli/compare/v1.7.1...v1.7.2) (2023-03-12)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* updated rtm-api dependency ([3c349c3](https://github.com/beauraines/rtm-cli/commit/3c349c311276dbf524732da6abd36d9ee96204d4))
|
|
20
|
+
|
|
5
21
|
### [1.7.1](https://github.com/beauraines/rtm-cli/compare/v1.7.0...v1.7.1) (2023-03-07)
|
|
6
22
|
|
|
7
23
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Remember The Milk Command Line Interface
|
|
2
2
|
========================================
|
|
3
3
|
|
|
4
|
-
**node module:** [rtm-cli](https://www.npmjs.com/package/rtm-cli)<br />
|
|
4
|
+
**node module:** [rtm-cli](https://www.npmjs.com/package/@beauraines/rtm-cli)<br />
|
|
5
5
|
**GitHub repo:** [beauraines/rtm-cli](https://github.com/beauraines/rtm-cli)
|
|
6
6
|
|
|
7
7
|
---
|
|
@@ -14,7 +14,7 @@ manager.
|
|
|
14
14
|
|
|
15
15
|
This is a fork of [dwaring87/rtm-cli](https://github.com/dwaring87/rtm-cli) so that I can maintain, modernize and add features. Your contributions are welcome!
|
|
16
16
|
|
|
17
|
-
This fork and [beauraines/rtm-api](https://github.com/beauraines/rtm-api)
|
|
17
|
+
This fork and [beauraines/rtm-api](https://github.com/beauraines/rtm-api) includes
|
|
18
18
|
|
|
19
19
|
1. performance improvements
|
|
20
20
|
2. rewriting to use Promises
|
|
@@ -64,37 +64,40 @@ The main usage of the program:
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
Commands:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
67
|
+
add|a [task...] Add a new Task
|
|
68
|
+
addList|al [name] [filter...] Add a new List or Smart List
|
|
69
|
+
addNote|addNotes [index] [title] [body] Add note or prompt for the title and body of the note. If only an index and text are included the text will be the body of the note without a title
|
|
70
|
+
addTags|at [index] [tags...] Add one or more tags to a Task
|
|
71
|
+
archiveList|arl [name...] Archive a List
|
|
72
|
+
comp|x [indices...] Complete one or more Tasks
|
|
73
|
+
decPri|- [indices...] Decrease the Priority of one or more Tasks
|
|
74
|
+
due [index] [due...] Set the Due Date of a Task
|
|
75
|
+
edit [index] [name...] Change the name of a Task
|
|
76
|
+
incPri|+ [indices...] Increase the Priority of one or more Tasks
|
|
77
|
+
lists|l Display all lists
|
|
78
|
+
login Add RTM User information
|
|
79
|
+
logout Remove RTM User information
|
|
80
|
+
ls [filter...] List all tasks sorted first by list then by priority
|
|
81
|
+
lsd [filter...] List all tasks sorted first by due date then by priority
|
|
82
|
+
lsp [filter...] List all tasks sorted first by priority then due date
|
|
83
|
+
move|mv [index] [list...] Move Task to a different List
|
|
84
|
+
notes [indices...] Display the associated Notes of a Task
|
|
85
|
+
planner [options] [filter...] Display tasks in a weekly planner (--start: sun, mon, today)
|
|
86
|
+
postpone|pp [indices...] Postpone one or more Tasks
|
|
87
|
+
pri|p [index] [priority] Change Task Priority
|
|
88
|
+
remove|rm [indices...] Remove one or more Tasks
|
|
89
|
+
removeList|rml [name...] Remove a List
|
|
90
|
+
removeTags|rmt [index] [tags...] Remove one or more tags from a Task
|
|
91
|
+
renameList|mvl [oldName] [newName] Rename a List
|
|
92
|
+
reset Reset cached task indices
|
|
93
|
+
setUrl|su [index] [url] Set the URL of a Task
|
|
94
|
+
start [index] [start...] Set the Start Date of a Task
|
|
95
|
+
tags|t Display all tags
|
|
96
|
+
task [indices...] Display the Task details
|
|
97
|
+
uncomp|unc [indices...] Mark one or more Tasks as not complete
|
|
98
|
+
url [options] [indices...] Display the associated URL of a Task
|
|
99
|
+
whoami Display RTM user information
|
|
100
|
+
overdue Display incomplete tasks that are overdue
|
|
98
101
|
```
|
|
99
102
|
|
|
100
103
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beauraines/rtm-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "RTM CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rtm",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"homepage": "https://github.com/beauraines/rtm-cli#readme",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"chalk": "^4.0.0",
|
|
40
|
-
"@beauraines/rtm-api": "^1.
|
|
40
|
+
"@beauraines/rtm-api": "^1.6.0",
|
|
41
41
|
"cli-table3": "^0.6.3",
|
|
42
42
|
"commander": "^2.11.0",
|
|
43
43
|
"copy-paste": "^1.3.0",
|
package/src/cmd/start.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const log = require('../utils/log.js');
|
|
4
|
+
const config = require('../utils/config.js');
|
|
5
|
+
const { prompt } = require('../utils/prompt.js');
|
|
6
|
+
|
|
7
|
+
const finish = require('../utils/finish.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* This command sets the Start Date for a Task
|
|
12
|
+
* @param args index due
|
|
13
|
+
* @param env
|
|
14
|
+
*/
|
|
15
|
+
function action(args, env) {
|
|
16
|
+
|
|
17
|
+
// Prompt for Start Date
|
|
18
|
+
if ( args.length < 2 ) {
|
|
19
|
+
prompt('Task:', 'Start:', _promptFinished);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Use provided args
|
|
23
|
+
else {
|
|
24
|
+
_process(args[0], args[1].join(' '));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Process the returned answers
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
function _promptFinished(answers) {
|
|
35
|
+
for ( let i = 0; i < answers.length; i++ ) {
|
|
36
|
+
let answer = answers[i];
|
|
37
|
+
_process(answer[0], answer[1], i+1, answers.length);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Process the request
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
function _process(task, due, count=1, max=1) {
|
|
47
|
+
log.spinner.start("Setting Start Date(s)...");
|
|
48
|
+
config.user(function(user) {
|
|
49
|
+
|
|
50
|
+
// Parse arguments
|
|
51
|
+
task = parseInt(task.trim());
|
|
52
|
+
due = due.trim();
|
|
53
|
+
|
|
54
|
+
// Set Start Date
|
|
55
|
+
user.tasks.setStartDate(task, due, function(err) {
|
|
56
|
+
if ( err ) {
|
|
57
|
+
log.spinner.error("Could not set Start Date for Task #" + task + " (" + err.msg + ")");
|
|
58
|
+
}
|
|
59
|
+
_processFinished(count, max);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Request Callback
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
function _processFinished(count, max) {
|
|
70
|
+
log.spinner.start("Setting Start Date [" + count + "/" + max + "]...");
|
|
71
|
+
if ( count === max ) {
|
|
72
|
+
log.spinner.success("Task(s) Updated");
|
|
73
|
+
return finish();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
module.exports = {
|
|
79
|
+
command: 'start [index] [start...]',
|
|
80
|
+
description: 'Set the Start Date of a Task',
|
|
81
|
+
action: action
|
|
82
|
+
};
|