@wirecat/cli-core 0.608.0 → 0.609.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 +67 -1
- package/dist/background/deliver.d.ts +12 -1
- package/dist/background/deliver.js +38 -5
- package/dist/background/report/render.d.ts +61 -0
- package/dist/background/report/render.js +208 -0
- package/dist/background/report/schema.d.ts +66 -0
- package/dist/background/report/schema.js +191 -0
- package/dist/background/report/templates/morning-digest.email.en.liquid +79 -0
- package/dist/background/report/templates/morning-digest.email.ru.liquid +79 -0
- package/dist/background/report/templates/morning-digest.telegram.en.liquid +77 -0
- package/dist/background/report/templates/morning-digest.telegram.ru.liquid +77 -0
- package/dist/background/report/templates/morning-digest.text.en.liquid +76 -0
- package/dist/background/report/templates/morning-digest.text.ru.liquid +76 -0
- package/dist/background/report/view.d.ts +88 -0
- package/dist/background/report/view.js +152 -0
- package/dist/background/schedules.d.ts +6 -1
- package/dist/background/schedules.js +24 -7
- package/dist/cli/embedding-choice.d.ts +4 -1
- package/dist/cli/embedding-choice.js +6 -3
- package/dist/cli/messenger/models-command.js +46 -18
- package/dist/cli/messenger/search-answers.js +11 -2
- package/dist/cli/model-catalogue-command.d.ts +33 -0
- package/dist/cli/model-catalogue-command.js +110 -21
- package/dist/cli/schedule/schedule-command.js +18 -0
- package/dist/cli/store-settings.js +39 -3
- package/dist/crm/cli/csv.d.ts +18 -5
- package/dist/crm/cli/csv.js +30 -19
- package/dist/crm/cli/index.d.ts +1 -0
- package/dist/crm/cli/index.js +1 -0
- package/dist/embeddings/models.d.ts +185 -5
- package/dist/embeddings/models.js +119 -5
- package/dist/entities/index.d.ts +24 -0
- package/dist/entities/index.js +2 -1
- package/dist/entities/model.d.ts +42 -1
- package/dist/entities/model.js +20 -1
- package/dist/render/liquid.d.ts +14 -0
- package/dist/render/liquid.js +30 -0
- package/dist/replies/template.js +3 -22
- package/dist/search/lucene/plain.js +4 -1
- package/dist/search/question-plan.js +2 -1
- package/dist/sends/permissions.js +4 -0
- package/dist/services/embeddings-maintenance.d.ts +1 -1
- package/dist/services/embeddings-maintenance.js +6 -6
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +2 -0
- package/dist/services/meeting-model.d.ts +1 -1
- package/dist/services/meeting-model.js +4 -4
- package/dist/services/messages-meaning.js +25 -4
- package/dist/services/model-downloads.js +1 -1
- package/dist/services/notes-search.d.ts +1 -1
- package/dist/services/notes-search.js +2 -2
- package/dist/services/search-all.d.ts +2 -0
- package/dist/services/search-all.js +30 -8
- package/dist/services/text-model-choice.d.ts +50 -0
- package/dist/services/text-model-choice.js +151 -0
- package/dist/store/exports.d.ts +1 -0
- package/dist/store/exports.js +1 -0
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.js +1 -0
- package/dist/store/sqlite/owner-languages.d.ts +13 -0
- package/dist/store/sqlite/owner-languages.js +49 -0
- package/dist/store/sqlite/reported-relations.js +5 -1
- package/dist/store/sqlite/vectors.d.ts +2 -0
- package/dist/store/sqlite/vectors.js +5 -0
- package/dist/store/vectors.d.ts +2 -0
- package/dist/store/vectors.js +1 -0
- package/package.json +2 -2
- package/parity.json +13 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
export const REPORT_FORMAT = "wirecat.report/1";
|
|
2
|
+
export const REPORT_KINDS = ["morning-digest"];
|
|
3
|
+
/** In the order they are shown; `health` is not among them, it comes from the document's `health[]` only. */
|
|
4
|
+
export const SECTION_KINDS = ["today", "decisions", "money", "meetings", "projects", "mail"];
|
|
5
|
+
export const ITEM_TYPES = ["reply", "question", "task", "fact", "risk", "money", "decision", "meeting"];
|
|
6
|
+
export const CHANNEL_KINDS = ["telegram", "max", "whatsapp", "mail", "meeting", "task"];
|
|
7
|
+
const TEXT_LIMITS = { summary: 120, who: 80, topic: 60, action: 120, detail: 160, quote: 100, source: 40 };
|
|
8
|
+
const REQUIRED = {
|
|
9
|
+
reply: ["who", "topic", "action", "since"],
|
|
10
|
+
question: ["who", "topic", "action"],
|
|
11
|
+
task: ["topic", "due"],
|
|
12
|
+
fact: ["topic", "detail"],
|
|
13
|
+
risk: ["topic", "detail", "action"],
|
|
14
|
+
money: ["who", "topic", "amount"],
|
|
15
|
+
decision: ["topic", "action"],
|
|
16
|
+
meeting: ["topic", "time"],
|
|
17
|
+
};
|
|
18
|
+
const LEAKS = [
|
|
19
|
+
/\b[a-z]+:[a-z]+\/\S+/g,
|
|
20
|
+
/`+/g,
|
|
21
|
+
/(?<![\p{L}\p{N}])--[a-z][a-z0-9-]*/gu,
|
|
22
|
+
/(?<![\p{L}\p{N}_])[a-z][a-z0-9]*(?:_[a-z0-9]+)+(?![\p{L}\p{N}_])/gu,
|
|
23
|
+
];
|
|
24
|
+
/** What a leak pattern removed from agent text: a store reference, backticks, a `--flag` or a snake_case word. */
|
|
25
|
+
export const withoutLeaks = (text) => {
|
|
26
|
+
let leaks = 0;
|
|
27
|
+
let out = text;
|
|
28
|
+
for (const pattern of LEAKS)
|
|
29
|
+
out = out.replace(pattern, () => {
|
|
30
|
+
leaks++;
|
|
31
|
+
return "";
|
|
32
|
+
});
|
|
33
|
+
return { text: leaks ? out.replace(/\s{2,}/g, " ").trim() : out, leaks };
|
|
34
|
+
};
|
|
35
|
+
class Invalid extends Error {
|
|
36
|
+
}
|
|
37
|
+
const DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
38
|
+
const DATE_TIME = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})$/;
|
|
39
|
+
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
40
|
+
const oneOf = (values, value, at) => {
|
|
41
|
+
if (!values.includes(value))
|
|
42
|
+
throw new Invalid(at);
|
|
43
|
+
return value;
|
|
44
|
+
};
|
|
45
|
+
const whole = (value, at) => {
|
|
46
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < 0)
|
|
47
|
+
throw new Invalid(at);
|
|
48
|
+
return value;
|
|
49
|
+
};
|
|
50
|
+
const refsOf = (value, at) => {
|
|
51
|
+
if (value === undefined || value === null)
|
|
52
|
+
return [];
|
|
53
|
+
if (!Array.isArray(value) || value.some((one) => typeof one !== "string"))
|
|
54
|
+
throw new Invalid(at);
|
|
55
|
+
return value;
|
|
56
|
+
};
|
|
57
|
+
const momentOf = (value, at) => {
|
|
58
|
+
if (value === undefined || value === null)
|
|
59
|
+
return null;
|
|
60
|
+
if (typeof value !== "string" || !(DATE.test(value) || DATE_TIME.test(value)) || Number.isNaN(Date.parse(value)))
|
|
61
|
+
throw new Invalid(at);
|
|
62
|
+
return value;
|
|
63
|
+
};
|
|
64
|
+
const amountOf = (value, at) => {
|
|
65
|
+
if (value === undefined || value === null)
|
|
66
|
+
return null;
|
|
67
|
+
if (!isObject(value) ||
|
|
68
|
+
typeof value.value !== "number" ||
|
|
69
|
+
!Number.isFinite(value.value) ||
|
|
70
|
+
typeof value.currency !== "string" ||
|
|
71
|
+
!/^[A-Z]{3}$/.test(value.currency))
|
|
72
|
+
throw new Invalid(at);
|
|
73
|
+
return {
|
|
74
|
+
value: Math.abs(value.value),
|
|
75
|
+
currency: value.currency,
|
|
76
|
+
direction: oneOf(["in", "out"], value.direction, `${at}.direction`),
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
const cut = (text, limit) => (text.length <= limit ? text : `${text.slice(0, limit - 1).trimEnd()}…`);
|
|
80
|
+
/**
|
|
81
|
+
* Checks a parsed document and keeps what the renderers may show. Any agent string loses what `withoutLeaks` finds
|
|
82
|
+
* and is cut to its limit; a required field left empty by that makes the document invalid, as a missing one does.
|
|
83
|
+
*/
|
|
84
|
+
const checked = (document) => {
|
|
85
|
+
let leaks = 0;
|
|
86
|
+
const text = (value, field, at) => {
|
|
87
|
+
if (value === undefined || value === null)
|
|
88
|
+
return null;
|
|
89
|
+
if (typeof value !== "string")
|
|
90
|
+
throw new Invalid(at);
|
|
91
|
+
const clean = withoutLeaks(value.trim());
|
|
92
|
+
leaks += clean.leaks;
|
|
93
|
+
return clean.text ? cut(clean.text, TEXT_LIMITS[field]) : null;
|
|
94
|
+
};
|
|
95
|
+
if (!isObject(document))
|
|
96
|
+
throw new Invalid("document");
|
|
97
|
+
if (document.format !== REPORT_FORMAT)
|
|
98
|
+
throw new Invalid("format");
|
|
99
|
+
const kind = oneOf(REPORT_KINDS, document.kind, "kind");
|
|
100
|
+
if (typeof document.date !== "string" || !DATE.test(document.date) || Number.isNaN(Date.parse(document.date)))
|
|
101
|
+
throw new Invalid("date");
|
|
102
|
+
if (!Array.isArray(document.sections))
|
|
103
|
+
throw new Invalid("sections");
|
|
104
|
+
const sections = document.sections.map((section, s) => {
|
|
105
|
+
const at = `sections[${s}]`;
|
|
106
|
+
if (!isObject(section) || !Array.isArray(section.items))
|
|
107
|
+
throw new Invalid(at);
|
|
108
|
+
return {
|
|
109
|
+
kind: oneOf(SECTION_KINDS, section.kind, `${at}.kind`),
|
|
110
|
+
more: section.more === undefined || section.more === null ? 0 : whole(section.more, `${at}.more`),
|
|
111
|
+
items: section.items.map((item, i) => {
|
|
112
|
+
const where = `${at}.items[${i}]`;
|
|
113
|
+
if (!isObject(item))
|
|
114
|
+
throw new Invalid(where);
|
|
115
|
+
const type = oneOf(ITEM_TYPES, item.type, `${where}.type`);
|
|
116
|
+
const checkedItem = {
|
|
117
|
+
type,
|
|
118
|
+
who: text(item.who, "who", `${where}.who`),
|
|
119
|
+
topic: text(item.topic, "topic", `${where}.topic`),
|
|
120
|
+
action: text(item.action, "action", `${where}.action`),
|
|
121
|
+
detail: text(item.detail, "detail", `${where}.detail`),
|
|
122
|
+
quote: text(item.quote, "quote", `${where}.quote`),
|
|
123
|
+
since: momentOf(item.since, `${where}.since`),
|
|
124
|
+
due: momentOf(item.due, `${where}.due`),
|
|
125
|
+
time: momentOf(item.time, `${where}.time`),
|
|
126
|
+
amount: amountOf(item.amount, `${where}.amount`),
|
|
127
|
+
count: item.count === undefined || item.count === null ? null : whole(item.count, `${where}.count`),
|
|
128
|
+
priority: item.priority === undefined || item.priority === null
|
|
129
|
+
? "normal"
|
|
130
|
+
: oneOf(["high", "normal"], item.priority, `${where}.priority`),
|
|
131
|
+
channel: item.channel === undefined || item.channel === null
|
|
132
|
+
? null
|
|
133
|
+
: oneOf(CHANNEL_KINDS, item.channel, `${where}.channel`),
|
|
134
|
+
refs: refsOf(item.refs, `${where}.refs`),
|
|
135
|
+
};
|
|
136
|
+
const missing = REQUIRED[type].find((field) => checkedItem[field] === null);
|
|
137
|
+
if (missing)
|
|
138
|
+
throw new Invalid(`${where}.${missing}`);
|
|
139
|
+
return checkedItem;
|
|
140
|
+
}),
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
const health = (document.health === undefined || document.health === null ? [] : document.health);
|
|
144
|
+
if (!Array.isArray(health))
|
|
145
|
+
throw new Invalid("health");
|
|
146
|
+
return {
|
|
147
|
+
report: {
|
|
148
|
+
kind,
|
|
149
|
+
date: document.date,
|
|
150
|
+
summary: text(document.summary, "summary", "summary"),
|
|
151
|
+
sections,
|
|
152
|
+
health: health.map((entry, h) => {
|
|
153
|
+
const at = `health[${h}]`;
|
|
154
|
+
if (!isObject(entry) || typeof entry.stale_hours !== "number" || !(entry.stale_hours >= 0))
|
|
155
|
+
throw new Invalid(at);
|
|
156
|
+
const source = text(entry.source, "source", `${at}.source`);
|
|
157
|
+
if (source === null)
|
|
158
|
+
throw new Invalid(`${at}.source`);
|
|
159
|
+
return { source, staleHours: entry.stale_hours, refs: refsOf(entry.refs, `${at}.refs`) };
|
|
160
|
+
}),
|
|
161
|
+
},
|
|
162
|
+
leaks,
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* A run's answer as a report: one JSON object, bare or as the only fenced `json` block. Text that is neither is not a
|
|
167
|
+
* report (`undefined`) and keeps the Markdown path; a JSON answer that fails the check is `invalid`, with the path
|
|
168
|
+
* of the first field that failed, and is never shown.
|
|
169
|
+
*/
|
|
170
|
+
export const parseReport = (answer) => {
|
|
171
|
+
const text = answer.trim();
|
|
172
|
+
const fenced = /^```json[ \t]*\n([\s\S]*?)\n```$/.exec(text)?.[1];
|
|
173
|
+
const json = fenced ?? (text.startsWith("{") ? text : undefined);
|
|
174
|
+
if (json === undefined)
|
|
175
|
+
return undefined;
|
|
176
|
+
let document;
|
|
177
|
+
try {
|
|
178
|
+
document = JSON.parse(json);
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
return { invalid: "json" };
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
return checked(document);
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
if (error instanceof Invalid)
|
|
188
|
+
return { invalid: error.message };
|
|
189
|
+
throw error;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Email HTML with inline CSS: only div, p, b, i, a, br and span survive, with a style attribute and an href to a link
|
|
3
|
+
of the view model. No colour on the body: the grey (#8a8a8a) and the link blue (#3b82c4) read on white and on dark.
|
|
4
|
+
{%- endcomment -%}
|
|
5
|
+
{%- capture nl %}
|
|
6
|
+
{% endcapture -%}
|
|
7
|
+
{%- assign weekdays = "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" | split: "," -%}
|
|
8
|
+
{%- assign weekday = date.weekday | minus: 1 -%}
|
|
9
|
+
{%- assign muted = "color:#8a8a8a;font-size:13px" -%}
|
|
10
|
+
<div style="max-width:600px;font-family:-apple-system,Segoe UI,Roboto,Arial,sans-serif;font-size:15px">
|
|
11
|
+
{{- nl }}<p style="margin:0 0 8px;font-size:19px"><b>{{ emoji }} Digest for {{ weekdays[weekday] }}, {{ date.date }}</b></p>
|
|
12
|
+
{%- if summary %}{{ nl }}<p style="margin:0 0 12px">{{ summary }}</p>{% endif -%}
|
|
13
|
+
{%- if quiet -%}
|
|
14
|
+
{{ nl }}<p style="margin:0 0 12px">
|
|
15
|
+
{%- if health.items.size > 0 %}Nothing new, but {{ health.items[0].source }} has not synced for {{ health.items[0].span }}.
|
|
16
|
+
{%- else %}A quiet morning: nothing urgent.{% endif %}</p>
|
|
17
|
+
{%- endif -%}
|
|
18
|
+
{%- for section in sections -%}
|
|
19
|
+
{{ nl }}<p style="margin:20px 0 8px;font-size:17px"><b>{{ section.emoji }}{{ " " }}
|
|
20
|
+
{%- case section.kind -%}
|
|
21
|
+
{%- when "today" %}Today
|
|
22
|
+
{%- when "decisions" %}Waiting for your decision
|
|
23
|
+
{%- when "money" %}Money
|
|
24
|
+
{%- when "meetings" %}Meetings
|
|
25
|
+
{%- when "projects" %}Projects in motion
|
|
26
|
+
{%- when "mail" %}New mail
|
|
27
|
+
{%- endcase %}</b></p>
|
|
28
|
+
{%- for item in section.items -%}
|
|
29
|
+
{%- capture due -%}
|
|
30
|
+
{%- if item.due -%}
|
|
31
|
+
{%- if item.overdue %}<b>overdue by {{ item.due.span }}</b>
|
|
32
|
+
{%- else %}due {% if item.due.day == "today" %}today{% elsif item.due.day == "tomorrow" %}tomorrow{% else %}{{ item.due.date }}{% endif %}{% if item.due.time %}, {{ item.due.time }}{% endif %}
|
|
33
|
+
{%- endif -%}
|
|
34
|
+
{%- endif -%}
|
|
35
|
+
{%- endcapture -%}
|
|
36
|
+
{{ nl }}<p style="margin:0 0 12px;line-height:1.45">{{ item.emoji }}{{ " " }}
|
|
37
|
+
{%- case item.type -%}
|
|
38
|
+
{%- when "reply" %}<b>{{ item.who }} · {{ item.topic }}</b> — {{ item.action }}
|
|
39
|
+
{%- when "question" %}<b>{{ item.who }}</b> asks: {{ item.action }}
|
|
40
|
+
{%- when "task" %}<b>{{ item.topic }}</b> — {{ due }}
|
|
41
|
+
{%- when "fact" %}<b>{{ item.topic }}</b>: {{ item.detail }}
|
|
42
|
+
{%- when "risk" %}<b>{{ item.topic }}</b>: {{ item.detail }} → {{ item.action }}
|
|
43
|
+
{%- when "money" %}<b>{{ item.amount.text }} · {{ item.who }} · {{ item.topic }}</b>{% if item.action %} — {{ item.action }}{% endif %}
|
|
44
|
+
{%- when "decision" %}<b>{{ item.topic }}</b> — {% if item.count %}{{ item.count }} {% endif %}{{ item.action }}
|
|
45
|
+
{%- when "meeting" %}<b>
|
|
46
|
+
{%- if item.time.day == "today" %}{{ item.time.time }}
|
|
47
|
+
{%- elsif item.time.day == "yesterday" %}Yesterday
|
|
48
|
+
{%- elsif item.time.day == "tomorrow" %}Tomorrow, {{ item.time.time }}
|
|
49
|
+
{%- else %}{{ item.time.date }}{% if item.time.time %}, {{ item.time.time }}{% endif %}
|
|
50
|
+
{%- endif %} · {{ item.topic }}</b>{% if item.who %} · {{ item.who }}{% endif %}
|
|
51
|
+
{%- endcase -%}
|
|
52
|
+
{%- assign sep = "" -%}
|
|
53
|
+
{%- capture second -%}
|
|
54
|
+
{%- if item.since and "reply,question" contains item.type %}{{ sep }}waiting {{ item.since.span }}{% assign sep = " · " %}{% endif -%}
|
|
55
|
+
{%- if due != "" and "risk,money,decision" contains item.type %}{{ sep }}{{ due }}{% assign sep = " · " %}{% endif -%}
|
|
56
|
+
{%- if item.action and "task,meeting" contains item.type %}{{ sep }}{{ item.action }}{% assign sep = " · " %}{% endif -%}
|
|
57
|
+
{%- if item.detail and "task,money,meeting,decision" contains item.type %}{{ sep }}{{ item.detail }}{% assign sep = " · " %}{% endif -%}
|
|
58
|
+
{%- if item.who and "task,fact,risk,decision" contains item.type %}{{ sep }}{{ item.who }}{% assign sep = " · " %}{% endif -%}
|
|
59
|
+
{%- if item.channel %}{{ sep }}
|
|
60
|
+
{%- case item.channel -%}
|
|
61
|
+
{%- when "telegram" %}Telegram{% when "max" %}MAX{% when "whatsapp" %}WhatsApp
|
|
62
|
+
{%- when "mail" %}mail{% when "meeting" %}meeting{% when "task" %}task
|
|
63
|
+
{%- endcase -%}
|
|
64
|
+
{%- assign sep = " · " -%}
|
|
65
|
+
{%- endif -%}
|
|
66
|
+
{%- if item.quote %}{{ sep }}<i>“{{ item.quote }}”</i>{% assign sep = " · " %}{% endif -%}
|
|
67
|
+
{%- for link in item.links %}{{ sep }}<a href="{{ link.url }}" style="color:#3b82c4">{{ link.label }}</a>{% assign sep = " · " %}{% endfor -%}
|
|
68
|
+
{%- endcapture -%}
|
|
69
|
+
{%- if second != "" %}<br><span style="{{ muted }}">{{ second }}</span>{% endif %}</p>
|
|
70
|
+
{%- endfor -%}
|
|
71
|
+
{%- if section.more > 0 %}{{ nl }}<p style="margin:0 0 12px;{{ muted }}">{{ section.more }} more</p>{% endif -%}
|
|
72
|
+
{%- endfor -%}
|
|
73
|
+
{%- unless quiet -%}
|
|
74
|
+
{%- for source in health.items -%}
|
|
75
|
+
{{ nl }}<p style="margin:20px 0 0;{{ muted }}">{{ health.emoji }} {{ source.source }} has not synced for {{ source.span }}
|
|
76
|
+
{%- for link in source.links %} · <a href="{{ link.url }}" style="color:#3b82c4">{{ link.label }}</a>{% endfor %}</p>
|
|
77
|
+
{%- endfor -%}
|
|
78
|
+
{%- endunless -%}
|
|
79
|
+
{{ nl }}</div>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Email HTML with inline CSS: only div, p, b, i, a, br and span survive, with a style attribute and an href to a link
|
|
3
|
+
of the view model. No colour on the body: the grey (#8a8a8a) and the link blue (#3b82c4) read on white and on dark.
|
|
4
|
+
{%- endcomment -%}
|
|
5
|
+
{%- capture nl %}
|
|
6
|
+
{% endcapture -%}
|
|
7
|
+
{%- assign weekdays = "понедельник,вторник,среду,четверг,пятницу,субботу,воскресенье" | split: "," -%}
|
|
8
|
+
{%- assign weekday = date.weekday | minus: 1 -%}
|
|
9
|
+
{%- assign muted = "color:#8a8a8a;font-size:13px" -%}
|
|
10
|
+
<div style="max-width:600px;font-family:-apple-system,Segoe UI,Roboto,Arial,sans-serif;font-size:15px">
|
|
11
|
+
{{- nl }}<p style="margin:0 0 8px;font-size:19px"><b>{{ emoji }} Сводка на {{ weekdays[weekday] }}, {{ date.date }}</b></p>
|
|
12
|
+
{%- if summary %}{{ nl }}<p style="margin:0 0 12px">{{ summary }}</p>{% endif -%}
|
|
13
|
+
{%- if quiet -%}
|
|
14
|
+
{{ nl }}<p style="margin:0 0 12px">
|
|
15
|
+
{%- if health.items.size > 0 %}Новых дел нет, но {{ health.items[0].source }} не обновлялся {{ health.items[0].span }}.
|
|
16
|
+
{%- else %}Тихое утро: ничего срочного.{% endif %}</p>
|
|
17
|
+
{%- endif -%}
|
|
18
|
+
{%- for section in sections -%}
|
|
19
|
+
{{ nl }}<p style="margin:20px 0 8px;font-size:17px"><b>{{ section.emoji }}{{ " " }}
|
|
20
|
+
{%- case section.kind -%}
|
|
21
|
+
{%- when "today" %}Сегодня
|
|
22
|
+
{%- when "decisions" %}Ждут вашего решения
|
|
23
|
+
{%- when "money" %}Деньги
|
|
24
|
+
{%- when "meetings" %}Встречи
|
|
25
|
+
{%- when "projects" %}Проекты в движении
|
|
26
|
+
{%- when "mail" %}Новая почта
|
|
27
|
+
{%- endcase %}</b></p>
|
|
28
|
+
{%- for item in section.items -%}
|
|
29
|
+
{%- capture due -%}
|
|
30
|
+
{%- if item.due -%}
|
|
31
|
+
{%- if item.overdue %}<b>просрочено на {{ item.due.span }}</b>
|
|
32
|
+
{%- else %}срок {% if item.due.day == "today" %}сегодня{% elsif item.due.day == "tomorrow" %}завтра{% else %}{{ item.due.date }}{% endif %}{% if item.due.time %}, {{ item.due.time }}{% endif %}
|
|
33
|
+
{%- endif -%}
|
|
34
|
+
{%- endif -%}
|
|
35
|
+
{%- endcapture -%}
|
|
36
|
+
{{ nl }}<p style="margin:0 0 12px;line-height:1.45">{{ item.emoji }}{{ " " }}
|
|
37
|
+
{%- case item.type -%}
|
|
38
|
+
{%- when "reply" %}<b>{{ item.who }} · {{ item.topic }}</b> — {{ item.action }}
|
|
39
|
+
{%- when "question" %}<b>{{ item.who }}</b> спрашивает: {{ item.action }}
|
|
40
|
+
{%- when "task" %}<b>{{ item.topic }}</b> — {{ due }}
|
|
41
|
+
{%- when "fact" %}<b>{{ item.topic }}</b>: {{ item.detail }}
|
|
42
|
+
{%- when "risk" %}<b>{{ item.topic }}</b>: {{ item.detail }} → {{ item.action }}
|
|
43
|
+
{%- when "money" %}<b>{{ item.amount.text }} · {{ item.who }} · {{ item.topic }}</b>{% if item.action %} — {{ item.action }}{% endif %}
|
|
44
|
+
{%- when "decision" %}<b>{{ item.topic }}</b> — {% if item.count %}{{ item.count }} {% endif %}{{ item.action }}
|
|
45
|
+
{%- when "meeting" %}<b>
|
|
46
|
+
{%- if item.time.day == "today" %}{{ item.time.time }}
|
|
47
|
+
{%- elsif item.time.day == "yesterday" %}Вчера
|
|
48
|
+
{%- elsif item.time.day == "tomorrow" %}Завтра, {{ item.time.time }}
|
|
49
|
+
{%- else %}{{ item.time.date }}{% if item.time.time %}, {{ item.time.time }}{% endif %}
|
|
50
|
+
{%- endif %} · {{ item.topic }}</b>{% if item.who %} · {{ item.who }}{% endif %}
|
|
51
|
+
{%- endcase -%}
|
|
52
|
+
{%- assign sep = "" -%}
|
|
53
|
+
{%- capture second -%}
|
|
54
|
+
{%- if item.since and "reply,question" contains item.type %}{{ sep }}ждёт {{ item.since.span }}{% assign sep = " · " %}{% endif -%}
|
|
55
|
+
{%- if due != "" and "risk,money,decision" contains item.type %}{{ sep }}{{ due }}{% assign sep = " · " %}{% endif -%}
|
|
56
|
+
{%- if item.action and "task,meeting" contains item.type %}{{ sep }}{{ item.action }}{% assign sep = " · " %}{% endif -%}
|
|
57
|
+
{%- if item.detail and "task,money,meeting,decision" contains item.type %}{{ sep }}{{ item.detail }}{% assign sep = " · " %}{% endif -%}
|
|
58
|
+
{%- if item.who and "task,fact,risk,decision" contains item.type %}{{ sep }}{{ item.who }}{% assign sep = " · " %}{% endif -%}
|
|
59
|
+
{%- if item.channel %}{{ sep }}
|
|
60
|
+
{%- case item.channel -%}
|
|
61
|
+
{%- when "telegram" %}Telegram{% when "max" %}MAX{% when "whatsapp" %}WhatsApp
|
|
62
|
+
{%- when "mail" %}почта{% when "meeting" %}встреча{% when "task" %}задача
|
|
63
|
+
{%- endcase -%}
|
|
64
|
+
{%- assign sep = " · " -%}
|
|
65
|
+
{%- endif -%}
|
|
66
|
+
{%- if item.quote %}{{ sep }}<i>«{{ item.quote }}»</i>{% assign sep = " · " %}{% endif -%}
|
|
67
|
+
{%- for link in item.links %}{{ sep }}<a href="{{ link.url }}" style="color:#3b82c4">{{ link.label }}</a>{% assign sep = " · " %}{% endfor -%}
|
|
68
|
+
{%- endcapture -%}
|
|
69
|
+
{%- if second != "" %}<br><span style="{{ muted }}">{{ second }}</span>{% endif %}</p>
|
|
70
|
+
{%- endfor -%}
|
|
71
|
+
{%- if section.more > 0 %}{{ nl }}<p style="margin:0 0 12px;{{ muted }}">ещё {{ section.more }}</p>{% endif -%}
|
|
72
|
+
{%- endfor -%}
|
|
73
|
+
{%- unless quiet -%}
|
|
74
|
+
{%- for source in health.items -%}
|
|
75
|
+
{{ nl }}<p style="margin:20px 0 0;{{ muted }}">{{ health.emoji }} {{ source.source }} не обновлялся {{ source.span }}
|
|
76
|
+
{%- for link in source.links %} · <a href="{{ link.url }}" style="color:#3b82c4">{{ link.label }}</a>{% endfor %}</p>
|
|
77
|
+
{%- endfor -%}
|
|
78
|
+
{%- endunless -%}
|
|
79
|
+
{{ nl }}</div>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Telegram HTML: only <b>, <i> and <a href> survive, and an href only to a link of the view model.
|
|
3
|
+
Every string from the report is already escaped. Lines are written with {{ nl }}; tags trim the source's own.
|
|
4
|
+
{%- endcomment -%}
|
|
5
|
+
{%- capture nl %}
|
|
6
|
+
{% endcapture -%}
|
|
7
|
+
{%- assign weekdays = "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" | split: "," -%}
|
|
8
|
+
{%- assign weekday = date.weekday | minus: 1 -%}
|
|
9
|
+
{{ emoji }} <b>Digest for {{ weekdays[weekday] }}, {{ date.date }}</b>
|
|
10
|
+
{%- if summary %}{{ nl }}{{ summary }}{% endif -%}
|
|
11
|
+
{%- if quiet -%}
|
|
12
|
+
{{ nl }}{{ nl }}
|
|
13
|
+
{%- if health.items.size > 0 %}Nothing new, but {{ health.items[0].source }} has not synced for {{ health.items[0].span }}.
|
|
14
|
+
{%- else %}A quiet morning: nothing urgent.{% endif -%}
|
|
15
|
+
{%- endif -%}
|
|
16
|
+
{%- for section in sections -%}
|
|
17
|
+
{{ nl }}{{ nl }}{{ section.emoji }} <b>
|
|
18
|
+
{%- case section.kind -%}
|
|
19
|
+
{%- when "today" %}Today
|
|
20
|
+
{%- when "decisions" %}Waiting for your decision
|
|
21
|
+
{%- when "money" %}Money
|
|
22
|
+
{%- when "meetings" %}Meetings
|
|
23
|
+
{%- when "projects" %}Projects in motion
|
|
24
|
+
{%- when "mail" %}New mail
|
|
25
|
+
{%- endcase %}</b>
|
|
26
|
+
{%- for item in section.items -%}
|
|
27
|
+
{%- capture due -%}
|
|
28
|
+
{%- if item.due -%}
|
|
29
|
+
{%- if item.overdue %}<b>overdue by {{ item.due.span }}</b>
|
|
30
|
+
{%- else %}due {% if item.due.day == "today" %}today{% elsif item.due.day == "tomorrow" %}tomorrow{% else %}{{ item.due.date }}{% endif %}{% if item.due.time %}, {{ item.due.time }}{% endif %}
|
|
31
|
+
{%- endif -%}
|
|
32
|
+
{%- endif -%}
|
|
33
|
+
{%- endcapture -%}
|
|
34
|
+
{{ nl }}{{ item.emoji }}{{ " " }}
|
|
35
|
+
{%- case item.type -%}
|
|
36
|
+
{%- when "reply" %}<b>{{ item.who }} · {{ item.topic }}</b> — {{ item.action }}
|
|
37
|
+
{%- when "question" %}<b>{{ item.who }}</b> asks: {{ item.action }}
|
|
38
|
+
{%- when "task" %}<b>{{ item.topic }}</b> — {{ due }}
|
|
39
|
+
{%- when "fact" %}<b>{{ item.topic }}</b>: {{ item.detail }}
|
|
40
|
+
{%- when "risk" %}<b>{{ item.topic }}</b>: {{ item.detail }} → {{ item.action }}
|
|
41
|
+
{%- when "money" %}<b>{{ item.amount.text }} · {{ item.who }} · {{ item.topic }}</b>{% if item.action %} — {{ item.action }}{% endif %}
|
|
42
|
+
{%- when "decision" %}<b>{{ item.topic }}</b> — {% if item.count %}{{ item.count }} {% endif %}{{ item.action }}
|
|
43
|
+
{%- when "meeting" %}<b>
|
|
44
|
+
{%- if item.time.day == "today" %}{{ item.time.time }}
|
|
45
|
+
{%- elsif item.time.day == "yesterday" %}Yesterday
|
|
46
|
+
{%- elsif item.time.day == "tomorrow" %}Tomorrow, {{ item.time.time }}
|
|
47
|
+
{%- else %}{{ item.time.date }}{% if item.time.time %}, {{ item.time.time }}{% endif %}
|
|
48
|
+
{%- endif %} · {{ item.topic }}</b>{% if item.who %} · {{ item.who }}{% endif %}
|
|
49
|
+
{%- endcase -%}
|
|
50
|
+
{%- assign sep = "" -%}
|
|
51
|
+
{%- capture second -%}
|
|
52
|
+
{%- if item.since and "reply,question" contains item.type %}{{ sep }}waiting {{ item.since.span }}{% assign sep = " · " %}{% endif -%}
|
|
53
|
+
{%- if due != "" and "risk,money,decision" contains item.type %}{{ sep }}{{ due }}{% assign sep = " · " %}{% endif -%}
|
|
54
|
+
{%- if item.action and "task,meeting" contains item.type %}{{ sep }}{{ item.action }}{% assign sep = " · " %}{% endif -%}
|
|
55
|
+
{%- if item.detail and "task,money,meeting,decision" contains item.type %}{{ sep }}{{ item.detail }}{% assign sep = " · " %}{% endif -%}
|
|
56
|
+
{%- if item.who and "task,fact,risk,decision" contains item.type %}{{ sep }}{{ item.who }}{% assign sep = " · " %}{% endif -%}
|
|
57
|
+
{%- if item.channel %}{{ sep }}
|
|
58
|
+
{%- case item.channel -%}
|
|
59
|
+
{%- when "telegram" %}Telegram{% when "max" %}MAX{% when "whatsapp" %}WhatsApp
|
|
60
|
+
{%- when "mail" %}mail{% when "meeting" %}meeting{% when "task" %}task
|
|
61
|
+
{%- endcase -%}
|
|
62
|
+
{%- assign sep = " · " -%}
|
|
63
|
+
{%- endif -%}
|
|
64
|
+
{%- if item.quote %}{{ sep }}<i>“{{ item.quote }}”</i>{% assign sep = " · " %}{% endif -%}
|
|
65
|
+
{%- for link in item.links %}{{ sep }}<a href="{{ link.url }}">{{ link.label }}</a>{% assign sep = " · " %}{% endfor -%}
|
|
66
|
+
{%- endcapture -%}
|
|
67
|
+
{%- if second != "" %}{{ nl }}{{ second }}{% endif -%}
|
|
68
|
+
{%- endfor -%}
|
|
69
|
+
{%- if section.more > 0 %}{{ nl }}{{ section.more }} more{% endif -%}
|
|
70
|
+
{%- endfor -%}
|
|
71
|
+
{%- unless quiet -%}
|
|
72
|
+
{%- if health.items.size > 0 %}{{ nl }}{% endif -%}
|
|
73
|
+
{%- for source in health.items -%}
|
|
74
|
+
{{ nl }}{{ health.emoji }} {{ source.source }} has not synced for {{ source.span }}
|
|
75
|
+
{%- for link in source.links %} · <a href="{{ link.url }}">{{ link.label }}</a>{% endfor -%}
|
|
76
|
+
{%- endfor -%}
|
|
77
|
+
{%- endunless -%}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Telegram HTML: only <b>, <i> and <a href> survive, and an href only to a link of the view model.
|
|
3
|
+
Every string from the report is already escaped. Lines are written with {{ nl }}; tags trim the source's own.
|
|
4
|
+
{%- endcomment -%}
|
|
5
|
+
{%- capture nl %}
|
|
6
|
+
{% endcapture -%}
|
|
7
|
+
{%- assign weekdays = "понедельник,вторник,среду,четверг,пятницу,субботу,воскресенье" | split: "," -%}
|
|
8
|
+
{%- assign weekday = date.weekday | minus: 1 -%}
|
|
9
|
+
{{ emoji }} <b>Сводка на {{ weekdays[weekday] }}, {{ date.date }}</b>
|
|
10
|
+
{%- if summary %}{{ nl }}{{ summary }}{% endif -%}
|
|
11
|
+
{%- if quiet -%}
|
|
12
|
+
{{ nl }}{{ nl }}
|
|
13
|
+
{%- if health.items.size > 0 %}Новых дел нет, но {{ health.items[0].source }} не обновлялся {{ health.items[0].span }}.
|
|
14
|
+
{%- else %}Тихое утро: ничего срочного.{% endif -%}
|
|
15
|
+
{%- endif -%}
|
|
16
|
+
{%- for section in sections -%}
|
|
17
|
+
{{ nl }}{{ nl }}{{ section.emoji }} <b>
|
|
18
|
+
{%- case section.kind -%}
|
|
19
|
+
{%- when "today" %}Сегодня
|
|
20
|
+
{%- when "decisions" %}Ждут вашего решения
|
|
21
|
+
{%- when "money" %}Деньги
|
|
22
|
+
{%- when "meetings" %}Встречи
|
|
23
|
+
{%- when "projects" %}Проекты в движении
|
|
24
|
+
{%- when "mail" %}Новая почта
|
|
25
|
+
{%- endcase %}</b>
|
|
26
|
+
{%- for item in section.items -%}
|
|
27
|
+
{%- capture due -%}
|
|
28
|
+
{%- if item.due -%}
|
|
29
|
+
{%- if item.overdue %}<b>просрочено на {{ item.due.span }}</b>
|
|
30
|
+
{%- else %}срок {% if item.due.day == "today" %}сегодня{% elsif item.due.day == "tomorrow" %}завтра{% else %}{{ item.due.date }}{% endif %}{% if item.due.time %}, {{ item.due.time }}{% endif %}
|
|
31
|
+
{%- endif -%}
|
|
32
|
+
{%- endif -%}
|
|
33
|
+
{%- endcapture -%}
|
|
34
|
+
{{ nl }}{{ item.emoji }}{{ " " }}
|
|
35
|
+
{%- case item.type -%}
|
|
36
|
+
{%- when "reply" %}<b>{{ item.who }} · {{ item.topic }}</b> — {{ item.action }}
|
|
37
|
+
{%- when "question" %}<b>{{ item.who }}</b> спрашивает: {{ item.action }}
|
|
38
|
+
{%- when "task" %}<b>{{ item.topic }}</b> — {{ due }}
|
|
39
|
+
{%- when "fact" %}<b>{{ item.topic }}</b>: {{ item.detail }}
|
|
40
|
+
{%- when "risk" %}<b>{{ item.topic }}</b>: {{ item.detail }} → {{ item.action }}
|
|
41
|
+
{%- when "money" %}<b>{{ item.amount.text }} · {{ item.who }} · {{ item.topic }}</b>{% if item.action %} — {{ item.action }}{% endif %}
|
|
42
|
+
{%- when "decision" %}<b>{{ item.topic }}</b> — {% if item.count %}{{ item.count }} {% endif %}{{ item.action }}
|
|
43
|
+
{%- when "meeting" %}<b>
|
|
44
|
+
{%- if item.time.day == "today" %}{{ item.time.time }}
|
|
45
|
+
{%- elsif item.time.day == "yesterday" %}Вчера
|
|
46
|
+
{%- elsif item.time.day == "tomorrow" %}Завтра, {{ item.time.time }}
|
|
47
|
+
{%- else %}{{ item.time.date }}{% if item.time.time %}, {{ item.time.time }}{% endif %}
|
|
48
|
+
{%- endif %} · {{ item.topic }}</b>{% if item.who %} · {{ item.who }}{% endif %}
|
|
49
|
+
{%- endcase -%}
|
|
50
|
+
{%- assign sep = "" -%}
|
|
51
|
+
{%- capture second -%}
|
|
52
|
+
{%- if item.since and "reply,question" contains item.type %}{{ sep }}ждёт {{ item.since.span }}{% assign sep = " · " %}{% endif -%}
|
|
53
|
+
{%- if due != "" and "risk,money,decision" contains item.type %}{{ sep }}{{ due }}{% assign sep = " · " %}{% endif -%}
|
|
54
|
+
{%- if item.action and "task,meeting" contains item.type %}{{ sep }}{{ item.action }}{% assign sep = " · " %}{% endif -%}
|
|
55
|
+
{%- if item.detail and "task,money,meeting,decision" contains item.type %}{{ sep }}{{ item.detail }}{% assign sep = " · " %}{% endif -%}
|
|
56
|
+
{%- if item.who and "task,fact,risk,decision" contains item.type %}{{ sep }}{{ item.who }}{% assign sep = " · " %}{% endif -%}
|
|
57
|
+
{%- if item.channel %}{{ sep }}
|
|
58
|
+
{%- case item.channel -%}
|
|
59
|
+
{%- when "telegram" %}Telegram{% when "max" %}MAX{% when "whatsapp" %}WhatsApp
|
|
60
|
+
{%- when "mail" %}почта{% when "meeting" %}встреча{% when "task" %}задача
|
|
61
|
+
{%- endcase -%}
|
|
62
|
+
{%- assign sep = " · " -%}
|
|
63
|
+
{%- endif -%}
|
|
64
|
+
{%- if item.quote %}{{ sep }}<i>«{{ item.quote }}»</i>{% assign sep = " · " %}{% endif -%}
|
|
65
|
+
{%- for link in item.links %}{{ sep }}<a href="{{ link.url }}">{{ link.label }}</a>{% assign sep = " · " %}{% endfor -%}
|
|
66
|
+
{%- endcapture -%}
|
|
67
|
+
{%- if second != "" %}{{ nl }}{{ second }}{% endif -%}
|
|
68
|
+
{%- endfor -%}
|
|
69
|
+
{%- if section.more > 0 %}{{ nl }}ещё {{ section.more }}{% endif -%}
|
|
70
|
+
{%- endfor -%}
|
|
71
|
+
{%- unless quiet -%}
|
|
72
|
+
{%- if health.items.size > 0 %}{{ nl }}{% endif -%}
|
|
73
|
+
{%- for source in health.items -%}
|
|
74
|
+
{{ nl }}{{ health.emoji }} {{ source.source }} не обновлялся {{ source.span }}
|
|
75
|
+
{%- for link in source.links %} · <a href="{{ link.url }}">{{ link.label }}</a>{% endfor -%}
|
|
76
|
+
{%- endfor -%}
|
|
77
|
+
{%- endunless -%}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Plain text: the terminal, latest.txt, the desktop notice, the email's plain part. Line 2 is indented by three spaces.
|
|
3
|
+
{%- endcomment -%}
|
|
4
|
+
{%- capture nl %}
|
|
5
|
+
{% endcapture -%}
|
|
6
|
+
{%- assign weekdays = "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" | split: "," -%}
|
|
7
|
+
{%- assign weekday = date.weekday | minus: 1 -%}
|
|
8
|
+
{{ emoji }} Digest for {{ weekdays[weekday] }}, {{ date.date }}
|
|
9
|
+
{%- if summary %}{{ nl }}{{ summary }}{% endif -%}
|
|
10
|
+
{%- if quiet -%}
|
|
11
|
+
{{ nl }}{{ nl }}
|
|
12
|
+
{%- if health.items.size > 0 %}Nothing new, but {{ health.items[0].source }} has not synced for {{ health.items[0].span }}.
|
|
13
|
+
{%- else %}A quiet morning: nothing urgent.{% endif -%}
|
|
14
|
+
{%- endif -%}
|
|
15
|
+
{%- for section in sections -%}
|
|
16
|
+
{{ nl }}{{ nl }}{{ section.emoji }}{{ " " }}
|
|
17
|
+
{%- case section.kind -%}
|
|
18
|
+
{%- when "today" %}Today
|
|
19
|
+
{%- when "decisions" %}Waiting for your decision
|
|
20
|
+
{%- when "money" %}Money
|
|
21
|
+
{%- when "meetings" %}Meetings
|
|
22
|
+
{%- when "projects" %}Projects in motion
|
|
23
|
+
{%- when "mail" %}New mail
|
|
24
|
+
{%- endcase -%}
|
|
25
|
+
{%- for item in section.items -%}
|
|
26
|
+
{%- capture due -%}
|
|
27
|
+
{%- if item.due -%}
|
|
28
|
+
{%- if item.overdue %}overdue by {{ item.due.span }}
|
|
29
|
+
{%- else %}due {% if item.due.day == "today" %}today{% elsif item.due.day == "tomorrow" %}tomorrow{% else %}{{ item.due.date }}{% endif %}{% if item.due.time %}, {{ item.due.time }}{% endif %}
|
|
30
|
+
{%- endif -%}
|
|
31
|
+
{%- endif -%}
|
|
32
|
+
{%- endcapture -%}
|
|
33
|
+
{{ nl }}{{ item.emoji }}{{ " " }}
|
|
34
|
+
{%- case item.type -%}
|
|
35
|
+
{%- when "reply" %}{{ item.who }} · {{ item.topic }} — {{ item.action }}
|
|
36
|
+
{%- when "question" %}{{ item.who }} asks: {{ item.action }}
|
|
37
|
+
{%- when "task" %}{{ item.topic }} — {{ due }}
|
|
38
|
+
{%- when "fact" %}{{ item.topic }}: {{ item.detail }}
|
|
39
|
+
{%- when "risk" %}{{ item.topic }}: {{ item.detail }} → {{ item.action }}
|
|
40
|
+
{%- when "money" %}{{ item.amount.text }} · {{ item.who }} · {{ item.topic }}{% if item.action %} — {{ item.action }}{% endif %}
|
|
41
|
+
{%- when "decision" %}{{ item.topic }} — {% if item.count %}{{ item.count }} {% endif %}{{ item.action }}
|
|
42
|
+
{%- when "meeting" -%}
|
|
43
|
+
{%- if item.time.day == "today" %}{{ item.time.time }}
|
|
44
|
+
{%- elsif item.time.day == "yesterday" %}Yesterday
|
|
45
|
+
{%- elsif item.time.day == "tomorrow" %}Tomorrow, {{ item.time.time }}
|
|
46
|
+
{%- else %}{{ item.time.date }}{% if item.time.time %}, {{ item.time.time }}{% endif %}
|
|
47
|
+
{%- endif %} · {{ item.topic }}{% if item.who %} · {{ item.who }}{% endif %}
|
|
48
|
+
{%- endcase -%}
|
|
49
|
+
{%- assign sep = "" -%}
|
|
50
|
+
{%- capture second -%}
|
|
51
|
+
{%- if item.since and "reply,question" contains item.type %}{{ sep }}waiting {{ item.since.span }}{% assign sep = " · " %}{% endif -%}
|
|
52
|
+
{%- if due != "" and "risk,money,decision" contains item.type %}{{ sep }}{{ due }}{% assign sep = " · " %}{% endif -%}
|
|
53
|
+
{%- if item.action and "task,meeting" contains item.type %}{{ sep }}{{ item.action }}{% assign sep = " · " %}{% endif -%}
|
|
54
|
+
{%- if item.detail and "task,money,meeting,decision" contains item.type %}{{ sep }}{{ item.detail }}{% assign sep = " · " %}{% endif -%}
|
|
55
|
+
{%- if item.who and "task,fact,risk,decision" contains item.type %}{{ sep }}{{ item.who }}{% assign sep = " · " %}{% endif -%}
|
|
56
|
+
{%- if item.channel %}{{ sep }}
|
|
57
|
+
{%- case item.channel -%}
|
|
58
|
+
{%- when "telegram" %}Telegram{% when "max" %}MAX{% when "whatsapp" %}WhatsApp
|
|
59
|
+
{%- when "mail" %}mail{% when "meeting" %}meeting{% when "task" %}task
|
|
60
|
+
{%- endcase -%}
|
|
61
|
+
{%- assign sep = " · " -%}
|
|
62
|
+
{%- endif -%}
|
|
63
|
+
{%- if item.quote %}{{ sep }}“{{ item.quote }}”{% assign sep = " · " %}{% endif -%}
|
|
64
|
+
{%- for link in item.links %}{{ sep }}{{ link.url }}{% assign sep = " · " %}{% endfor -%}
|
|
65
|
+
{%- endcapture -%}
|
|
66
|
+
{%- if second != "" %}{{ nl }} {{ second }}{% endif -%}
|
|
67
|
+
{%- endfor -%}
|
|
68
|
+
{%- if section.more > 0 %}{{ nl }}{{ section.more }} more{% endif -%}
|
|
69
|
+
{%- endfor -%}
|
|
70
|
+
{%- unless quiet -%}
|
|
71
|
+
{%- if health.items.size > 0 %}{{ nl }}{% endif -%}
|
|
72
|
+
{%- for source in health.items -%}
|
|
73
|
+
{{ nl }}{{ health.emoji }} {{ source.source }} has not synced for {{ source.span }}
|
|
74
|
+
{%- for link in source.links %} · {{ link.url }}{% endfor -%}
|
|
75
|
+
{%- endfor -%}
|
|
76
|
+
{%- endunless -%}
|