Rename brain-dump to tasks
This commit is contained in:
parent
e26f7e141b
commit
10a4c1227b
12 changed files with 415 additions and 296 deletions
|
|
@ -4,7 +4,7 @@ const fs = require('fs');
|
|||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
|
||||
const DUMP_PATH = path.join(__dirname, '..', 'memory', 'brain-dump.json');
|
||||
const DUMP_PATH = path.join(__dirname, '..', 'memory', 'tasks.json');
|
||||
|
||||
const NUDGE_INTERVALS = {
|
||||
now: 24 * 60 * 60 * 1000, // 1 day
|
||||
|
|
@ -112,7 +112,7 @@ function cmdAdd(args) {
|
|||
|
||||
function cmdEdit(args) {
|
||||
const id = args[0];
|
||||
if (!id) { console.error('Usage: brain-dump edit <id> [--text ...] [--priority ...] [--context ...] [--frequency ...] [--when ...]'); process.exit(1); }
|
||||
if (!id) { console.error('Usage: tasks edit <id> [--text ...] [--priority ...] [--context ...] [--frequency ...] [--when ...]'); process.exit(1); }
|
||||
|
||||
const data = load();
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ function cmdEdit(args) {
|
|||
|
||||
function cmdDone(args) {
|
||||
const id = args[0];
|
||||
if (!id) { console.error('Usage: brain-dump done <id>'); process.exit(1); }
|
||||
if (!id) { console.error('Usage: tasks done <id>'); process.exit(1); }
|
||||
|
||||
const data = load();
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ function cmdDone(args) {
|
|||
|
||||
function cmdShow(args) {
|
||||
const id = args[0];
|
||||
if (!id) { console.error('Usage: brain-dump show <id>'); process.exit(1); }
|
||||
if (!id) { console.error('Usage: tasks show <id>'); process.exit(1); }
|
||||
|
||||
const data = load();
|
||||
const item = (data.tasks || []).find(t => t.id === id)
|
||||
|
|
@ -187,7 +187,7 @@ function cmdShow(args) {
|
|||
|
||||
function cmdNudged(args) {
|
||||
const ids = (args[0] || '').split(',').map(s => s.trim()).filter(Boolean);
|
||||
if (ids.length === 0) { console.error('Usage: brain-dump nudged <id1>,<id2>,...'); process.exit(1); }
|
||||
if (ids.length === 0) { console.error('Usage: tasks nudged <id1>,<id2>,...'); process.exit(1); }
|
||||
|
||||
const data = load();
|
||||
const now = new Date().toISOString();
|
||||
|
|
@ -236,7 +236,7 @@ switch (cmd) {
|
|||
case 'nudged': cmdNudged(args); break;
|
||||
case 'recurring': cmdRecurring(); break;
|
||||
default:
|
||||
console.log(`Usage: brain-dump <command>
|
||||
console.log(`Usage: tasks <command>
|
||||
|
||||
Commands:
|
||||
list [--priority now,soon] [--due] [--limit N]
|
||||
Loading…
Add table
Add a link
Reference in a new issue