@@ -9,6 +9,10 @@ import (
9
9
"github.com/dhth/omm/internal/types"
10
10
)
11
11
12
+ const (
13
+ codeBlockMarker = "```"
14
+ )
15
+
12
16
type entry struct {
13
17
summary string
14
18
ctx string
@@ -19,21 +23,21 @@ func insertGuideTasks(db *sql.DB) error {
19
23
var entries = []entry {
20
24
{
21
25
"guide: welcome to omm" ,
22
- `Hi there 👋 Thanks for trying out omm.
26
+ fmt . Sprintf ( `Hi there 👋 Thanks for trying out ** omm** .
23
27
24
28
This is a guided walkthrough to get you acquainted with omm's features.
25
29
26
30
Before we begin, let's get the basics out of the way: you exit omm by pressing
27
- q/esc/ctrl+c . These keys also move you back menus/panes whilst using omm's TUI.
31
+ %s . These keys also move you back menus/panes whilst using omm's TUI.
28
32
29
- Onwards with the walkthrough then! Simply press j/↓ , and follow the
33
+ Onwards with the walkthrough then! Simply press %s , and follow the
30
34
instructions.
31
- ` ,
35
+ ` , "`q/esc/<ctrl+c>`" , "`j/↓`" ),
32
36
true ,
33
37
},
34
38
{
35
39
"domain: tasks" ,
36
- `omm (" on-my-mind" ) is a task manager. You can also think of it as a keyboard
40
+ `omm (** on-my-mind** ) is a task manager. You can also think of it as a keyboard
37
41
driven to-do list.
38
42
39
43
As such, tasks are at the core of omm. A task can be anything that you want to
@@ -48,176 +52,181 @@ you want to save details that don't fit in a single line.
48
52
},
49
53
{
50
54
"domain: task state" ,
51
- `A task can be in one of two states: active or archived.
55
+ fmt . Sprintf ( `A task can be in one of two states: ** active** or ** archived** .
52
56
53
57
This list shows active tasks.
54
58
55
59
To be pedantic about things, only the tasks in the active list are supposed to
56
60
be "on your mind". However, there are benefits to having a list of archived
57
61
tasks as well.
58
62
59
- Press <tab> to see the archived list.
60
- ` ,
63
+ Press %s to see the archived list.
64
+ ` , "`<tab>`" ),
61
65
true ,
62
66
},
63
67
{
64
68
"domain: task details" ,
65
- `The " Task Details" pane is intended for when you simply want to read all the
69
+ fmt . Sprintf ( `The ** Task Details** pane is intended for when you simply want to read all the
66
70
details associated with a task in a full screen view.
67
71
68
- You can view this pane by pressing "d".
72
+ You can view this pane by pressing %s. This pane is useful when a task's
73
+ context is too long to fit in the context pane.
69
74
70
75
Whilst in this pane, you can move backwards and forwards in the
71
- task list by pressing "h/<-/->/l" . You quit out of this pane by either pressing
72
- "d" again, or q/esc/ctrl+c .
76
+ task list by pressing %s . You quit out of this pane by either pressing
77
+ %s again, or %s .
73
78
74
79
Try it out. Come back to this entry when you're done.
75
- ` ,
80
+ ` , "`d`" , "`h/<-/->/l`" , "`d`" , "`q/esc/<ctrl+c>`" ),
76
81
true ,
77
82
},
78
83
{
79
84
"domain: an archived task" ,
80
- `This is the archived list, meaning it holds tasks that are no longer being
81
- worked on.
85
+ fmt . Sprintf ( `This is the **Archived Tasks** list, meaning it holds tasks that are no longer
86
+ being worked on.
82
87
83
88
omm provides this list both for historical reference, as well as for you to be
84
89
able to move an archived task back into the active list.
85
90
86
- You can toggle the state of a task using <ctrl+d> .
91
+ You can toggle the state of a task using %s .
87
92
88
- Press tab/q/esc/ctrl+c to go back to the active list.
89
- ` ,
93
+ Press %s to go back to the active list.
94
+ ` , "`ctrl+d`" , "`tab/q/esc/<ctrl+c>`" ),
90
95
false ,
91
96
},
92
97
{
93
98
"visuals: list density" ,
94
- `omm's task lists can be viewed in two density modes: compact and spacious.
99
+ fmt . Sprintf ( `omm's task lists can be viewed in two density modes: ** compact** and ** spacious** .
95
100
96
101
This is the compact mode. As opposed to this, the spacious mode shows tasks in a
97
102
more roomier list, alongside highlighting prefixes (we'll see what that means),
98
103
and showing creation timestamps.
99
104
100
105
omm starts up with spacious mode by default (you can change this, as we'll see
101
- soon). You can toggle between the two modes by pressing "v" . Choose whichever
106
+ soon). You can toggle between the two modes by pressing %s . Choose whichever
102
107
mode fits your workflow better.
103
108
104
109
Try it out. Come back to this mode once you're done.
105
- ` ,
110
+ ` , "`v`" ),
106
111
true ,
107
112
},
108
113
{
109
114
"visuals: toggling context pane" ,
110
- `The context pane can be toggled on/off by pressing "C" .
115
+ fmt . Sprintf ( `The context pane can be toggled on/off by pressing %s .
111
116
112
117
You can choose to display it or not based on your preference. For convenience,
113
118
the lists will always highlight tasks that have a context associated with them
114
- by having a " (c)" marker on them.
119
+ by having a ** (c)** marker on them.
115
120
116
121
omm starts up with the context pane hidden by default (you can change this, as
117
122
we'll see soon).
118
- ` ,
123
+ ` , "`C`" ),
119
124
true ,
120
125
},
121
126
{
122
127
"actions: adding tasks" ,
123
- `Let's get to the crux of omm: adding and prioritizing tasks. We'll
128
+ fmt . Sprintf ( `Let's get to the crux of omm: ** adding and prioritizing tasks** . We'll
124
129
begin with adding tasks.
125
130
126
- You can add a task below the cursor by pressing "a" . Once you get acquainted
131
+ You can add a task below the cursor by pressing %s . Once you get acquainted
127
132
with omm, you'll want to have more control on the position of the newly added
128
133
task. omm offers the following keymaps for that.
129
134
130
- o/a add task below cursor
131
- O add task above cursor
132
- I add task at the top
133
- A add task at the end
135
+ o/a add task below cursor
136
+ O add task above cursor
137
+ I add task at the top
138
+ A add task at the end
134
139
135
140
Go ahead, create a task, then move to the next guided item.
136
- ` ,
141
+ ` , "`a`" ),
137
142
true ,
138
143
},
139
144
{
140
145
"cli: adding a task via the CLI" ,
141
- `You can also add a task to omm via its command line interface. For example:
146
+ fmt . Sprintf ( `You can also add a task to omm via its command line interface. For example:
142
147
148
+ %sbash
143
149
omm 'prefix: a task summary'
150
+ %s
144
151
145
152
This will add an entry to the top of the active tasks list.
146
- ` ,
153
+ ` , codeBlockMarker , codeBlockMarker ),
147
154
true ,
148
155
},
149
156
{
150
157
"cli: importing several tasks via the CLI" ,
151
- `You can also import more than one task at a time by using the "import"
158
+ fmt . Sprintf ( `You can also import more than one task at a time by using the ** "import"**
152
159
subcommand. For example:
153
160
161
+ %sbash
154
162
cat << 'EOF' | omm import
155
163
orders: order new ACME rocket skates
156
164
traps: draw fake tunnel on the canyon wall
157
165
tech: assemble ACME jet-propelled pogo stick
158
166
EOF
167
+ %s
159
168
160
169
omm will expect each line in stdin to hold one task's summary.
161
- ` ,
170
+ ` , codeBlockMarker , codeBlockMarker ),
162
171
true ,
163
172
},
164
173
{
165
174
"actions: adding context" ,
166
- `As mentioned before, once a task is created, you might want to add context to
175
+ fmt . Sprintf ( `As mentioned before, once a task is created, you might want to add context to
167
176
it.
168
177
169
- You do that by pressing "c" . Go ahead, try it out. Try changing the text, and
178
+ You do that by pressing %s . Go ahead, try it out. Try changing the text, and
170
179
then save the file. This context text should get updated accordingly.
171
180
172
- Once saved, you can also copy a tasks's context to your system clipboard by pressing "y" .
173
- ` ,
181
+ Once saved, you can also copy a tasks's context to your system clipboard by pressing %s .
182
+ ` , "`c`" , "`y`" ),
174
183
true ,
175
184
},
176
185
{
177
186
"actions: filtering tasks" ,
178
- `You can filter tasks in a list by pressing "/" . Doing this will open up a search
187
+ fmt . Sprintf ( `You can filter tasks in a list by pressing %s . Doing this will open up a search
179
188
prompt, which will match your query with task prefixes.
180
189
181
- Try it out now. You get out of the filtered state by pressing "q/esc/ctrl+c" .
190
+ Try it out now. You get out of the filtered state by pressing %s .
182
191
183
192
Note: You cannot add tasks or move them around in a filtered state. But, you can
184
- move a task to the top of the list (by pressing ⏎ ). Doing this will also get you
193
+ move a task to the top of the list (by pressing %s ). Doing this will also get you
185
194
out of the filtered state.
186
- ` ,
195
+ ` , "`/`" , "`q/esc/<ctrl+c>`" , "`⏎`" ),
187
196
true ,
188
197
},
189
198
{
190
199
"actions: quick filtering via a list" ,
191
- `You can also choose the prefix you want to filter by with the means of a list,
192
- hereby called as the " Quick Filter List" . Press "ctrl+p" to open up a set of
193
- task prefixes contained in the currently active task list. Press ⏎ to
200
+ fmt . Sprintf ( `You can also choose the prefix you want to filter by with the means of a list,
201
+ hereby called as the ** Quick Filter List** . Press %s to open up a set of
202
+ task prefixes contained in the currently active task list. Press %s to
194
203
pre-populate the task list's search prompt with your selection.
195
204
196
205
Try it out now.
197
206
198
- Note: Both the " Active Tasks List" and " Archived Tasks List" can be filtered
199
- separately, using either the manual filtering approach or via the " Quick Filter
200
- List" .
201
- ` ,
207
+ Note: Both the ** Active Tasks List** and ** Archived Tasks List** can be filtered
208
+ separately, using either the manual filtering approach or via the ** Quick Filter
209
+ List** .
210
+ ` , "`ctrl+p`" , "`⏎`" ),
202
211
true ,
203
212
},
204
213
{
205
214
"domain: task bookmarks" ,
206
- `Sometimes you'll add URLs to a task's summary or its context.
215
+ fmt . Sprintf ( `Sometimes you'll add URLs to a task's summary or its context.
207
216
208
217
Such URLs (eg. https://github.com/dhth/omm, https://tools.dhruvs.space,
209
218
https://c.xkcd.com/random/comic) could be placed anywhere in the summary/
210
219
context.
211
220
212
- omm lets you open these URLs via a single keypress. You can either press "b" to
213
- open up a list of all URLs, and then open one of them by pressing ⏎ , or open all
214
- of them by pressing "B" .
221
+ omm lets you open these URLs via a single keypress. You can either press %s to
222
+ open up a list of all URLs, and then open one of them by pressing %s , or open all
223
+ of them by pressing %s .
215
224
216
- Note: if the task has a single URL added to it, pressing "b" will skip showing
225
+ Note: if the task has a single URL added to it, pressing %s will skip showing
217
226
the list, and open the URL directly.
218
227
219
- Try both approaches now. Press "b", interact with the list, and then press "B".
220
- ` ,
228
+ Try both approaches now.
229
+ ` , "`b`" , "`⏎`" , "`B`" , "`b`" ),
221
230
true ,
222
231
},
223
232
{
@@ -229,9 +238,9 @@ And, as we all know, priorities often change. You're probably juggling multiple
229
238
tasks on any given day. As such, omm allows you to move tasks around in the
230
239
priority order. It has the following keymaps to achieve this:
231
240
232
- ⏎ move task to the top
233
- J move task one position down
234
- K move task one position up
241
+ ⏎ move task to the top
242
+ J move task one position down
243
+ K move task one position up
235
244
236
245
It's recommended that you move the task that you're currently focussing on to
237
246
the top.
@@ -240,52 +249,57 @@ the top.
240
249
},
241
250
{
242
251
"actions: updating task details" ,
243
- `Once a task is created, its summary and context can be changed at any point.
252
+ fmt . Sprintf ( `Once a task is created, its summary and context can be changed at any point.
244
253
245
- You can update a task's summary by pressing "u" .
254
+ You can update a task's summary by pressing %s .
246
255
247
256
This will open up the the same prompt you saw when creating a new task, with the
248
257
only difference that the task's summary will be pre-filled for you. This can
249
258
come in handy when you want to quickly jot down a task for yourself (either by
250
- using the TUI, or by using the CLI (eg. "omm 'a hastily written task summary" )),
259
+ using the TUI, or by using the CLI (eg. %s )),
251
260
and then come back to it later to refine it more.
252
261
253
- Similarly, you can also update a task's context any time (by pressing "c" ).
254
- ` ,
262
+ Similarly, you can also update a task's context any time (by pressing %s ).
263
+ ` , "`u`" , "`omm 'a hastily written task summary'`" , "`c`" ),
255
264
true ,
256
265
},
257
266
{
258
267
"config: changing the defaults" ,
259
- `omm allows you to change the some of its behavior via configuration, which it
268
+ fmt . Sprintf ( `omm allows you to change the some of its behavior via configuration, which it
260
269
will consider in the order listed below:
261
270
262
- - CLI flags (run "omm -h" to see details)
263
- - Environment variables (eg. "OMM_EDITOR" )
264
- - A TOML configuration file (run "omm -h" to see where this lives; you can
265
- change this via the flag "--config-path" )
271
+ - CLI flags (run %s to see details)
272
+ - Environment variables (eg. %s )
273
+ - A TOML configuration file (run %s to see where this lives; you can
274
+ change this via the flag %s )
266
275
267
276
omm will consider configuration in the order laid out above, ie, CLI flags will
268
277
take the highest priority.
269
- ` ,
278
+ ` , "`omm -h`" , "`$OMM_EDITOR`" , "`omm -h`" , "`--config-path`" ),
270
279
true ,
271
280
},
272
281
{
273
282
"config: flags, env vars, and config file" ,
274
- `Every flag listed by "omm -h" (except "--config-path" ) has an environment
283
+ fmt . Sprintf ( `Every flag listed by %s (except %s ) has an environment
275
284
variable counterpart, as well as a TOML config counterpart.
276
285
277
286
For example:
278
287
288
+ %stext
279
289
--show-context -> OMM_SHOW_CONTEXT -> show_context
280
290
--editor -> OMM_EDITOR -> editor
281
- ` ,
291
+ %s
292
+ ` , "`omm -h`" , "`--config-path`" , codeBlockMarker , codeBlockMarker ),
282
293
true ,
283
294
},
284
295
{
285
296
"config: a sample TOML config" ,
286
297
fmt .Sprintf (`Here's a sample TOML configuration file:
287
298
288
- %s` , sampleCfg ),
299
+ %stoml
300
+ %s
301
+ %s
302
+ ` , codeBlockMarker , sampleCfg , codeBlockMarker ),
289
303
true ,
290
304
},
291
305
{
0 commit comments