brain-dump: merge --note into --context, single field for extra info
This commit is contained in:
parent
0352f8d04b
commit
516d6a1b34
3 changed files with 7 additions and 12 deletions
4
TOOLS.md
4
TOOLS.md
|
|
@ -142,8 +142,8 @@ Helper script: `~/clawd/bin/brain-dump`
|
||||||
```bash
|
```bash
|
||||||
brain-dump list [--priority now,soon] [--due] [--limit N]
|
brain-dump list [--priority now,soon] [--due] [--limit N]
|
||||||
brain-dump add --text "..." --priority soon [--context "..."]
|
brain-dump add --text "..." --priority soon [--context "..."]
|
||||||
brain-dump add --recurring --text "..." --frequency daily [--when evening] [--note "..."] [--context "..."]
|
brain-dump add --recurring --text "..." --frequency daily [--when evening] [--context "..."]
|
||||||
brain-dump edit <id> [--text "..."] [--priority|--frequency|--when|--note|--context "..."]
|
brain-dump edit <id> [--text "..."] [--priority|--frequency|--when|--context "..."]
|
||||||
brain-dump done <id>
|
brain-dump done <id>
|
||||||
brain-dump show <id>
|
brain-dump show <id>
|
||||||
brain-dump nudged <id1>,<id2>,...
|
brain-dump nudged <id1>,<id2>,...
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ function formatTask(t) {
|
||||||
|
|
||||||
function formatRecurring(r) {
|
function formatRecurring(r) {
|
||||||
let line = `${r.id}\t${r.frequency}\t${r.when || '-'}\t${r.text}`;
|
let line = `${r.id}\t${r.frequency}\t${r.when || '-'}\t${r.text}`;
|
||||||
if (r.note) line += `\t${r.note}`;
|
|
||||||
if (r.context) line += `\t${r.context}`;
|
if (r.context) line += `\t${r.context}`;
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
@ -93,10 +92,8 @@ function cmdAdd(args) {
|
||||||
if (isRecurring) {
|
if (isRecurring) {
|
||||||
const frequency = getFlag(args, '--frequency') || 'daily';
|
const frequency = getFlag(args, '--frequency') || 'daily';
|
||||||
const when = getFlag(args, '--when') || undefined;
|
const when = getFlag(args, '--when') || undefined;
|
||||||
const note = getFlag(args, '--note') || undefined;
|
|
||||||
const item = { id: shortId(), text, frequency };
|
const item = { id: shortId(), text, frequency };
|
||||||
if (when) item.when = when;
|
if (when) item.when = when;
|
||||||
if (note) item.note = note;
|
|
||||||
if (context) item.context = context;
|
if (context) item.context = context;
|
||||||
data.recurring = data.recurring || [];
|
data.recurring = data.recurring || [];
|
||||||
data.recurring.push(item);
|
data.recurring.push(item);
|
||||||
|
|
@ -136,10 +133,8 @@ function cmdEdit(args) {
|
||||||
if (isRecurring) {
|
if (isRecurring) {
|
||||||
const frequency = getFlag(args, '--frequency');
|
const frequency = getFlag(args, '--frequency');
|
||||||
const when = getFlag(args, '--when');
|
const when = getFlag(args, '--when');
|
||||||
const note = getFlag(args, '--note');
|
|
||||||
if (frequency) item.frequency = frequency;
|
if (frequency) item.frequency = frequency;
|
||||||
if (when) item.when = when;
|
if (when) item.when = when;
|
||||||
if (note !== null && note !== undefined) item.note = note;
|
|
||||||
save(data);
|
save(data);
|
||||||
console.log(`Updated recurring: ${formatRecurring(item)}`);
|
console.log(`Updated recurring: ${formatRecurring(item)}`);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -246,8 +241,8 @@ switch (cmd) {
|
||||||
Commands:
|
Commands:
|
||||||
list [--priority now,soon] [--due] [--limit N]
|
list [--priority now,soon] [--due] [--limit N]
|
||||||
add --text "..." --priority soon [--context "..."]
|
add --text "..." --priority soon [--context "..."]
|
||||||
add --recurring --text "..." --frequency daily [--when evening] [--note "..."] [--context "..."]
|
add --recurring --text "..." --frequency daily [--when evening] [--context "..."]
|
||||||
edit <id> [--text "..."] [--priority|--frequency|--when|--note|--context "..."]
|
edit <id> [--text "..."] [--priority|--frequency|--when|--context "..."]
|
||||||
done <id>
|
done <id>
|
||||||
show <id>
|
show <id>
|
||||||
nudged <id1>,<id2>,...
|
nudged <id1>,<id2>,...
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"description": "Task tracking — auto-captured from chat or manually added. Done tasks get deleted.",
|
"description": "Task tracking \u2014 auto-captured from chat or manually added. Done tasks get deleted.",
|
||||||
"recurring": [
|
"recurring": [
|
||||||
{
|
{
|
||||||
"id": "843efabf",
|
"id": "843efabf",
|
||||||
"text": "Nose shower 👃🚿",
|
"text": "Nose shower \ud83d\udc43\ud83d\udebf",
|
||||||
"frequency": "daily",
|
"frequency": "daily",
|
||||||
"when": "evening",
|
"when": "evening",
|
||||||
"note": "Remind in evening, whether work just wrapped up or already relaxing"
|
"context": "Remind in evening, whether work just wrapped up or already relaxing"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tasks": [
|
"tasks": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue