diary.1.html (24546B)
1 <!DOCTYPE html> 2 <html> 3 <!-- This is an automatically generated file. Do not edit. 4 Generated by scdoc 1.11.3 5 Complete documentation for this program is not available as a GNU info page 6 --> 7 <head> 8 <meta charset="utf-8"/> 9 <meta name="viewport" content="width=device-width, initial-scale=1.0"/> 10 <link rel="stylesheet" href="style.css" type="text/css" media="all"/> 11 <title>DIARY(1)</title> 12 </head> 13 <body> 14 <table class="head"> 15 <tr> 16 <td class="head-ltitle">DIARY(1)</td> 17 <td class="head-vol">General Commands Manual</td> 18 <td class="head-rtitle">DIARY(1)</td> 19 </tr> 20 </table> 21 <div class="manual-text"> 22 <section class="Sh"> 23 <h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> 24 <p class="Pp">diary - text-based journaling program</p> 25 </section> 26 <section class="Sh"> 27 <h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> 28 <p class="Pp"><b>diary</b> [OPTION]... [DIARY_DIR]...</p> 29 </section> 30 <section class="Sh"> 31 <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> 32 <p class="Pp">Open the <b>diary</b> journal for entries stored in 33 <b>DIARY_DIR</b>.</p> 34 <p class="Pp"><b>DIARY_DIR</b> is required, if not set as environment variable 35 or defined in the <b>CONFIGURATION FILE</b>.</p> 36 </section> 37 <section class="Sh"> 38 <h1 class="Sh" id="OPTIONS"><a class="permalink" href="#OPTIONS">OPTIONS</a></h1> 39 <p class="Pp"><b>-v, --version</b></p> 40 <p class="Pp"></p> 41 <div class="Bd-indent">Print diary version</div> 42 <p class="Pp"><b>-h, --help</b></p> 43 <p class="Pp"></p> 44 <div class="Bd-indent">Show diary help text</div> 45 <p class="Pp"><b>-d, --dir</b>=DIARY_DIR</p> 46 <p class="Pp"></p> 47 <div class="Bd-indent">Directory with the journal text files</div> 48 <p class="Pp"><b>-e, --editor</b>=EDITOR</p> 49 <p class="Pp"></p> 50 <div class="Bd-indent">Text editor used for opening the journal files</div> 51 <p class="Pp"><b>-f, --fmt</b>=FMT</p> 52 <p class="Pp"></p> 53 <div class="Bd-indent">FMT is a custom date and file format. Change with care, 54 because the diary reads and writes to files with file name FMT. The new FMT is 55 only applied to newly saved entries. Existing entries with the old FMT are not 56 automatically migrated to the new FMT and do not show up with a new FMT 57 specifier. Consequently, a change in FMT shows an empty diary at first. Rename 58 all files in the <b>DIARY_DIR</b> to migrate to a new FMT.</div> 59 <p class="Pp"><b>-F, --fmt-cmd</b>=FMT_CMD</p> 60 <p class="Pp"></p> 61 <div class="Bd-indent">Journal entries are formatted with this command. If not 62 set (default), the characters are printed to the preview screen character by 63 character (without word wrap). For example, to enable word wrap after 75 64 characters, use "fmt -s" as FMT_CMD. To format markdown, use 65 "mdcat -c" or similar, see <b>CUSTOM FORMATTING</b>.</div> 66 <p class="Pp"><b>-p, --no-pty</b></p> 67 <p class="Pp"></p> 68 <div class="Bd-indent">No pseudo terminal (pty) for entry preview. Only 69 effective in combination with <b>--fmt-cmd</b>. If set, the output of 70 <b>--fmt-cmd</b> is displayed with Ncurses. If not set (default), the result 71 of <b>--fmt-cmd</b> (journal entry preview) is printed on a pseudo-terminal 72 (pty) and not processed with Ncurses. The pty supports the ANSI escape 73 sequences (e.g. colors, font types, etc.) of the native terminal.</div> 74 <p class="Pp"><b>-m, --no-mouse</b></p> 75 <p class="Pp"></p> 76 <div class="Bd-indent">Disable mouse, don't listen for mouse events. Mouse 77 events are enabled by default. Without <b>--no-mouse</b> flag (default), 78 native text selection and right-click in the preview window requires holding 79 down the SHIFT key, see <b>MOUSE EVENTS</b>.</div> 80 <p class="Pp"><b>-r, --range</b>=RANGE</p> 81 <p class="Pp"></p> 82 <div class="Bd-indent">The number of years to show before/after today. Defaults 83 to 1 year.</div> 84 <p class="Pp"><b>-w, --weekday</b>=DAY</p> 85 <p class="Pp"></p> 86 <div class="Bd-indent">First day of the week. DAY is an integer in range (0..6), 87 interpreted as 0 or 7 = Sun, 1 = Mon, ..., 6 = Sat. If glibc is installed, the 88 first day of the week is derived from the current locale setting ($LANG, see 89 man locale). Without glibc, the first weekday defaults to 1 (Monday), unless 90 specified otherwise with this option.</div> 91 </section> 92 <section class="Sh"> 93 <h1 class="Sh" id="NAVIGATION"><a class="permalink" href="#NAVIGATION">NAVIGATION</a></h1> 94 <p class="Pp">Navigation is done using the following vim-inspired keyboard 95 shortcuts:</p> 96 <p class="Pp"></p> 97 <table class="tbl" border="1" style="border-style: solid;"> 98 <tr> 99 <td><b>Key(s)</b></td> 100 <td>Action</td> 101 </tr> 102 <tr> 103 <td><b>e, Enter</b></td> 104 <td>edit current entry</td> 105 </tr> 106 <tr> 107 <td><b>d, x</b></td> 108 <td>delete current entry</td> 109 </tr> 110 <tr> 111 <td><b>t</b></td> 112 <td>jump to today</td> 113 </tr> 114 <tr> 115 <td><b>f</b></td> 116 <td>jump to or find specific day</td> 117 </tr> 118 <tr> 119 <td><b>j, down</b></td> 120 <td>go forward by 1 week</td> 121 </tr> 122 <tr> 123 <td><b>k, up</b></td> 124 <td>go backward by 1 week</td> 125 </tr> 126 <tr> 127 <td><b>h, left</b></td> 128 <td>go left by 1 day</td> 129 </tr> 130 <tr> 131 <td><b>l, right</b></td> 132 <td>go right by 1 day</td> 133 </tr> 134 <tr> 135 <td><b>J</b></td> 136 <td>go forward by 1 month</td> 137 </tr> 138 <tr> 139 <td><b>K</b></td> 140 <td>go backward by 1 month</td> 141 </tr> 142 <tr> 143 <td><b>N</b></td> 144 <td>go to the previous journal entry</td> 145 </tr> 146 <tr> 147 <td><b>n</b></td> 148 <td>go to the next journal entry</td> 149 </tr> 150 <tr> 151 <td><b>g</b></td> 152 <td>go to start of journal</td> 153 </tr> 154 <tr> 155 <td><b>G</b></td> 156 <td>go to end of journal</td> 157 </tr> 158 <tr> 159 <td><b>s, S</b></td> 160 <td>sync selected day/Month with CalDAV server</td> 161 </tr> 162 <tr> 163 <td><b>i</b></td> 164 <td>import entries from .ics file</td> 165 </tr> 166 <tr> 167 <td><b>E</b></td> 168 <td>export entries to .ics file</td> 169 </tr> 170 <tr> 171 <td><b>q</b></td> 172 <td>quit the program</td> 173 </tr> 174 </table> 175 <p class="Pp"></p> 176 </section> 177 <section class="Sh"> 178 <h1 class="Sh" id="ENVIRONMENT"><a class="permalink" href="#ENVIRONMENT">ENVIRONMENT</a></h1> 179 <p class="Pp"><b>DIARY_DIR</b></p> 180 <div class="Bd-indent">If this variable is set to a directory that can be 181 opened, diary will use it to store diary files. Diary files are simple text 182 files named after their date, formatted according to <b>FMT</b> (see 183 <b>--fmt</b> option). The format defaults to "%Y-%m-%d", which is 184 "YYYY-MM-DD" (see man strftime). All other files different from FMT 185 are ignored.</div> 186 <p class="Pp"><b>EDITOR</b></p> 187 <div class="Bd-indent">The program used to edit journal entries inside 188 <b>DIARY_DIR</b>.</div> 189 <p class="Pp"><b>LANG</b></p> 190 <div class="Bd-indent">The default locale used to display the first day of the 191 week, see <b>--weekday</b> option.</div> 192 </section> 193 <section class="Sh"> 194 <h1 class="Sh" id="ARGUMENTS"><a class="permalink" href="#ARGUMENTS">ARGUMENTS</a></h1> 195 <p class="Pp">If the argument <b>DIARY_DIR</b> is given, diary files are read 196 from and stored to that directory, ignoring the $DIARY_DIR environment 197 variable, any <b>--dir</b> option or the <b>dir</b> value set in the 198 <b>CONFIGURATION FILE</b>.</p> 199 </section> 200 <section class="Sh"> 201 <h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1> 202 <p class="Pp">${PREFIX:-/usr/local/bin}/<b>diary</b></p> 203 <div class="Bd-indent">The diary binary</div> 204 <p class="Pp">${XDG_CONFIG_HOME:-~/.config}/diary/<b>diary.cfg</b></p> 205 <div class="Bd-indent">An optional diary <b>CONFIGURATION FILE</b></div> 206 </section> 207 <section class="Sh"> 208 <h1 class="Sh" id="CONFIGURATION_FILE"><a class="permalink" href="#CONFIGURATION_FILE">CONFIGURATION 209 FILE</a></h1> 210 <p class="Pp">The <b>diary.cfg</b> configuration file can optionally be used to 211 persist diary configuration. Use the "#" or ";" 212 characters to comment lines.</p> 213 <p class="Pp">Create default configuration location:</p> 214 <p class="Pp"></p> 215 <div class="Bd-indent"> 216 <pre>mkdir -p ${XDG_CONFIG_HOME:-~/.config}/diary</pre> 217 </div> 218 <p class="Pp">Install an example configuration file with defaults:</p> 219 <p class="Pp"></p> 220 <div class="Bd-indent"> 221 <pre>tee ${XDG_CONFIG_HOME:-~/.config}/diary/diary.cfg <<EOF 222 # https://code.in0rdr.ch/diary/file/config/diary.cfg.html 223 # Path that holds the journal text files 224 #dir = ~/diary 225 # Number of years to show before/after todays date 226 range = 1 227 # 0 = Sunday, 1 = Monday, ..., 6 = Saturday 228 weekday = 1 229 # Date and file format, change with care 230 fmt = %Y-%m-%d 231 # Text format command for entry preview 232 fmt_cmd = 233 # Use pseudo terminal (pty) to view result of fmt_cmd 234 #no_pty = false 235 # Listen for mouse events 236 #no_mouse = false 237 # Editor to open journal files with 238 editor = 239 # CalDAV server URI 240 #caldav_server = 241 # Calendar name for CalDAV sync 242 #caldav_calendar = 243 # CalDAV server username 244 #caldav_username = 245 # CalDAV server password 246 #caldav_password = 247 # OAuth command to fetch access token. For example, "oama access" 248 #oauth_eval_cmd = 249 EOF</pre> 250 </div> 251 <p class="Pp">To copy the sample file from the source repository:</p> 252 <p class="Pp"></p> 253 <div class="Bd-indent"> 254 <pre>cp config/diary.cfg ${XDG_CONFIG_HOME:-~/.config}/diary/</pre> 255 </div> 256 <p class="Pp">The file "${XDG_CONFIG_HOME:-~/.config}/diary/diary.cfg" 257 should adhere to a basic "key = value" format. The value is read 258 until the end of the line '\n'. Lines can be commented with the special 259 characters "#"or ";".</p> 260 <p class="Pp">The following configuration keys are currently supported:</p> 261 <p class="Pp"></p> 262 <table class="tbl" border="1" style="border-style: solid;"> 263 <tr> 264 <td><b>Command Line Option</b></td> 265 <td><b>Config Key</b></td> 266 <td><b>Example Config Value</b></td> 267 <td><b>Default Config Value</b></td> 268 <td><b>Description</b></td> 269 </tr> 270 <tr> 271 <td>"--dir", "-d", or first non-option argument</td> 272 <td>dir</td> 273 <td>~/diary</td> 274 <td>n/a</td> 275 <td>Diary directory. Path that holds the journal text files. If unset, 276 defaults to environment variable "$DIARY_DIR".</td> 277 </tr> 278 <tr> 279 <td>"--editor" or "-e"</td> 280 <td>editor</td> 281 <td>vim </td> 282 <td>(empty) </td> 283 <td>Editor to open journal files with. If unset, defaults to environment 284 variable "$EDITOR". If no editor is provided, the diary is 285 opened read-only.</td> 286 </tr> 287 <tr> 288 <td>"--fmt" or "-f"</td> 289 <td>fmt</td> 290 <td>%d_%b_%y</td> 291 <td>%Y-%m-%d</td> 292 <td>Date format and file name for the files inside the "dir". For 293 the format specifiers, see "man strftime". Be careful: If you 294 change this, you might no longer find your existing diary entries, because 295 the diary assumes to find the journal files under another file name. 296 Hence, a change in FMT shows an empty diary, at first. Rename all files in 297 the DIARY_DIR to migrate to a new FMT.</td> 298 </tr> 299 <tr> 300 <td>"--fmt-cmd" or "-F"</td> 301 <td>fmt_cmd</td> 302 <td>"fmt -w75 -s", "mdcat -c" or "mdcat"</td> 303 <td>(empty)</td> 304 <td>Journal entries are formatted with this command. If not set (default), 305 the characters are printed to the preview screen character by character 306 (without word wrap). For example, to enable word wrap after 75 characters, 307 use "fmt -s" as FMT_CMD. See also [Custom 308 Formatting](#Custom-Formatting).</td> 309 </tr> 310 <tr> 311 <td>"--no-pty" or "-p"</td> 312 <td>no_pty</td> 313 <td>"true"</td> 314 <td>false (or 0)</td> 315 <td>No pseudo terminal (pty) for entry preview. Only effective in 316 combination with "--fmt-cmd". If set to true (or 1), the output 317 of "--fmt-cmd" is displayed with Ncurses. If set to false (or 318 0), the result of "--fmt-cmd" (journal entry preview) is printed 319 on a pseudo-terminal (pty) and not processed with Ncurses. The pty 320 supports the ANSI escape sequences (e.g. colors, font types, etc.) of the 321 native terminal.</td> 322 </tr> 323 <tr> 324 <td>"--no-mouse" or "-m"</td> 325 <td>no_mouse</td> 326 <td>"true"</td> 327 <td>false (or 0)</td> 328 <td>Don't listen for <b>MOUSE EVENTS</b>. With no_mouse=0 (default), native 329 text selection and right-click in the preview window requires holding down 330 the "SHIFT" key.</td> 331 </tr> 332 <tr> 333 <td>"--range" or "-r"</td> 334 <td>range</td> 335 <td>10</td> 336 <td>1</td> 337 <td>Number of years to show before/after todays date</td> 338 </tr> 339 <tr> 340 <td>"--weekday" or "-w"</td> 341 <td>weekday</td> 342 <td>0</td> 343 <td>1</td> 344 <td>First weekday, "7" = Sunday, "1" = Monday, ..., 345 "6" = Saturday. Use "7" (or "0") to display 346 week beginning at Sunday ("S-M-T-W-T-F-S"), or "1" for 347 "M-T-W-T-F-S-S". If "glibc" is installed, the first 348 day of the week is derived from the current locale setting 349 ("$LANG", see "man locale"). Without 350 "glibc", the first weekday defaults to 1 (Monday), unless 351 specified otherwise with this option.</td> 352 </tr> 353 <tr> 354 <td>n/a</td> 355 <td>caldav_server</td> 356 <td>Google calendar 357 "https://apidata.googleusercontent.com/caldav/v2", Yahoo 358 calendar "https://caldav.calendar.yahoo.com", GMX 359 "https://caldav.gmx.net", Nextcloud 360 "https://mycloud/remote.php/dav" or other CalDAV compatible 361 provider.</td> 362 <td>(empty)</td> 363 <td>CalDAV server for <b>CALDAV SYNC</b> (required).</td> 364 </tr> 365 <tr> 366 <td>n/a</td> 367 <td>caldav_calendar</td> 368 <td>diary </td> 369 <td>(empty)</td> 370 <td>Calendar name for <b>CALDAV SYNC</b> (required).</td> 371 </tr> 372 <tr> 373 <td>n/a</td> 374 <td>caldav_username</td> 375 <td></td> 376 <td>(empty)</td> 377 <td>CalDAV server username for <b>CALDAV SYNC</b> (optional).</td> 378 </tr> 379 <tr> 380 <td>n/a</td> 381 <td>caldav_password</td> 382 <td></td> 383 <td>(empty)</td> 384 <td>CalDAV server password for <b>CALDAV SYNC</b> (optional).</td> 385 </tr> 386 <tr> 387 <td>n/a</td> 388 <td>oauth_eval_cmd</td> 389 <td>"oama access <email>" or "pass"</td> 390 <td>(empty)</td> 391 <td>OAuth command to fetch access token for <b>CALDAV SYNC</b> 392 (optional).</td> 393 </tr> 394 </table> 395 <p class="Pp"></p> 396 </section> 397 <section class="Sh"> 398 <h1 class="Sh" id="CUSTOM_FORMATTING"><a class="permalink" href="#CUSTOM_FORMATTING">CUSTOM 399 FORMATTING</a></h1> 400 <p class="Pp">The preview of the journal entries can be processed with a custom 401 <b>--fmt-cmd</b>. The result of this formatting command is printed to a 402 pseudo-terminal (pty) by default. This behavior can be changed with the 403 <b>--no-pty</b> flag. The output processed on the pty (without Ncurses) 404 includes all ANSI escape characters supported by the terminal (colors, font 405 types, etc.). Thus, formatters like "fmt", or any "cat like 406 program" ("mdcat" to process Markdown) can be plugged in for 407 <b>--fmt-cmd</b>.</p> 408 </section> 409 <section class="Sh"> 410 <h1 class="Sh" id="MOUSE_EVENTS"><a class="permalink" href="#MOUSE_EVENTS">MOUSE 411 EVENTS</a></h1> 412 <p class="Pp">Mouse events are listened for by default (<b>no_mouse</b>=false 413 configuration). This behavior can be disabled with the <b>--no-mouse</b> 414 flag or in the <b>CONFIGURATION</b> <b>FILE</b> (<b>no_mouse</b>=true). With 415 <b>no_mouse</b>=false (default), use the SHIFT key for native text selection 416 and right-click in the preview window.</p> 417 </section> 418 <section class="Sh"> 419 <h1 class="Sh" id="IMPORT"><a class="permalink" href="#IMPORT">IMPORT</a></h1> 420 <p class="Pp">The import functionality can be triggered by pressing <b>i</b> and 421 expects a path to an ics file. Files in the <b>DIARY_DIR</b> are overwritten 422 with the entries from the imported ics file.</p> 423 </section> 424 <section class="Sh"> 425 <h1 class="Sh" id="EXPORT"><a class="permalink" href="#EXPORT">EXPORT</a></h1> 426 <p class="Pp">The export functionality can be triggered by pressing <b>E</b> and 427 asks for a file path to an ics file for storing the journal entries. The ics 428 file will be created if it does not exist. Existing ics files are 429 overwritten.</p> 430 </section> 431 <section class="Sh"> 432 <h1 class="Sh" id="CALDAV_SYNC"><a class="permalink" href="#CALDAV_SYNC">CALDAV 433 SYNC</a></h1> 434 <p class="Pp">The journal files can be synced via CalDAV by pressing <b>s</b>. 435 Pressing <b>S</b> syncs all journal entries of the active month.</p> 436 <p class="Pp">The most recently modified entry is considered up to date and is 437 automatically replaced on the remote side. If the remote file is more 438 recent, the local file can be replaced with the remote content after 439 confirmation.</p> 440 <p class="Pp">No sync is performed, when both files (local/remote) have the same 441 modification timestamp or no files exists on the server and on disk at all 442 (i.e., no entry for that date).</p> 443 <p class="Pp">The diary creates a full-day calendar entry. It's advised to use a 444 separate calendar for syncing purposes and not to have multiple events for a 445 day on the remote calendar. The diary only considers the first event of a 446 given day.</p> 447 <p class="Pp">The calender for synchronization can be defined with the 448 configuration key "caldav_calendar". This key is empty by default. 449 It is required to configure at least following parameters in the 450 <b>CONFIGURATION FILE</b>:</p> 451 <p class="Pp"></p> 452 <ul class="Bl-bullet"> 453 <li>caldav_server: Calendar server API</li> 454 <li>caldav_calendar: Calendar name for CalDAV sync</li> 455 </ul> 456 <p class="Pp">In addition, it is required to specifiy either 457 "caldav_username" and "caldav_password" for basicauth 458 (takes precedence) OR the "oauth_eval_cmd" to retreive an OAuth 459 access token from a password manager or tool that prints the token to 460 stdout. Leave username/password empty if you intend to use OAuth 461 ("oauth_eval_cmd").</p> 462 <p class="Pp">Read GOOGLE CALENDAR OAUTH2 to setup authorization with the Google 463 server. Other CalDAV servers and APIs that are secured with OAuth2 might 464 work as well (untested).</p> 465 <p class="Pp">Use the EXPORT/IMPORT functionality for more batch oriented 466 processing. Making a network request and deciding the most recently modified 467 entry (local/remote) takes quite some time for large batches.</p> 468 </section> 469 <section class="Sh"> 470 <h1 class="Sh" id="GOOGLE_CALENDAR_OAUTH2"><a class="permalink" href="#GOOGLE_CALENDAR_OAUTH2">GOOGLE 471 CALENDAR OAUTH2</a></h1> 472 <p class="Pp">To synchronize with the Google calendar, it is required to setup a 473 project in the cloud console and enable the CalDAV API (not the Google 474 Calendar API):</p> 475 <p class="Pp">https://console.cloud.google.com/apis/api/caldav.googleapis.com</p> 476 <p class="Pp">The Google Calendar CalDAV API is protected with OAuth2:</p> 477 <p class="Pp">https://developers.google.com/identity/protocols/oauth2</p> 478 <p class="Pp">The "application", the "consent screen" and 479 the "credentials" (client id and secret) need to be defined in the 480 Google cloud console. Client id and secret should be stored in an utility 481 application that can fetch and refresh the OAuth access token (e.g., 482 "oama"). The command to access the access token 483 ("oauth_eval_cmd") should be configured in the <b>CONFIGURATION 484 FILE</b>.</p> 485 <p class="Pp">The application requires two OAuth2 scopes 486 (https://developers.google.com/calendar/api/auth) for CalDAV requests:</p> 487 <p class="Pp"></p> 488 <ul class="Bl-bullet"> 489 <li>"https://www.googleapis.com/auth/calendar": read/share access to 490 Calendars, required to discover the unique hyperlink/URI for the calendar 491 specified by config key "caldav_calendar"</li> 492 <li>"https://www.googleapis.com/auth/calendar.events": read/write 493 access to Events owned by the user, allows diary to 494 create/read/update/delete events in "caldav_calendar"</li> 495 </ul> 496 <p class="Pp">The user is asked for consent during the first CALDAV SYNC.</p> 497 </section> 498 <section class="Sh"> 499 <h1 class="Sh" id="PRECEDENCE_RULES"><a class="permalink" href="#PRECEDENCE_RULES">PRECEDENCE 500 RULES</a></h1> 501 <p class="Pp">The default variables, for instance, for the configuration 502 variables "editor", "dir" and "weekday", are 503 populated with values in the following order, where earlier entries are 504 overwritten by subsequent ones if they exist:</p> 505 <p class="Pp"></p> 506 <table class="tbl" border="1" style="border-style: solid;"> 507 <tr> 508 <td></td> 509 <td><b>Description</b></td> 510 </tr> 511 <tr> 512 <td>1</td> 513 <td>No default for <b>DIARY_DIR</b>. Defaults for "range", 514 "weekday", "fmt" and "editor" are provided 515 in "diary.h". If <b>EDITOR</b> is unset and no editor is 516 provided in the <b>CONFIGURATION FILE</b> or <b>--editor</b> option, the 517 diary works read-only. Journal files cannot be opened. If <b>DIARY_DIR</b> 518 is not provided, the diary won't open.</td> 519 </tr> 520 <tr> 521 <td>2</td> 522 <td><b>CONFIGURATION FILE</b> (empty default for "editor", no 523 default for "dir")</td> 524 </tr> 525 <tr> 526 <td>3</td> 527 <td>Environment variables $DIARY_DIR, $EDITOR and $LANG for locale 528 ("weekday")</td> 529 </tr> 530 <tr> 531 <td>4</td> 532 <td>Option arguments, see section <b>OPTIONS</b></td> 533 </tr> 534 <tr> 535 <td>5</td> 536 <td>First non-option argument is interpreted as <b>DIARY_DIR</b></td> 537 </tr> 538 </table> 539 <p class="Pp"></p> 540 </section> 541 <section class="Sh"> 542 <h1 class="Sh" id="PRECEDENCE_EXAMPLE:_LOCALE_AND_FIRST_DAY_OF_WEEK"><a class="permalink" href="#PRECEDENCE_EXAMPLE:_LOCALE_AND_FIRST_DAY_OF_WEEK">PRECEDENCE 543 EXAMPLE: LOCALE AND FIRST DAY OF WEEK</a></h1> 544 <p class="Pp">If glibc is installed, the first weekday defaults to the locale 545 defined in the current shell environment ($LANG, see man locale), unless 546 specified otherwise with the <b>--weekday</b> option.</p> 547 <p class="Pp">Start with weekday=3(Wed), overrule any other configuration 548 value:</p> 549 <div class="Bd-indent"> 550 <pre>diary -w3</pre> 551 </div> 552 <p class="Pp">Start with glibc derived weekday=1, regardless of weekday in 553 config file:</p> 554 <div class="Bd-indent"> 555 <pre>LANG=de_CH diary</pre> 556 </div> 557 <p class="Pp">If glibc is installed, start with glibc derived base date 558 (weekday=0):</p> 559 <div class="Bd-indent"> 560 <pre>LANG= diary</pre> 561 </div> 562 <p class="Pp">Disable environment variable, default to value from config 563 file:</p> 564 <div class="Bd-indent"> 565 <pre>unset LANG</pre> 566 </div> 567 <p class="Pp">Start with weekday default from config file, if available:</p> 568 <div class="Bd-indent"> 569 <pre>diary</pre> 570 </div> 571 <p class="Pp">Remove config file:</p> 572 <div class="Bd-indent"> 573 <pre>rm ${XDG_CONFIG_HOME:-~/.config}/diary/diary.cfg</pre> 574 </div> 575 <p class="Pp">Start with weekday default value from source code (1=Mon):</p> 576 <div class="Bd-indent"> 577 <pre>diary</pre> 578 </div> 579 </section> 580 <section class="Sh"> 581 <h1 class="Sh" id="DEVELOPMENT_AND_SUPPORT"><a class="permalink" href="#DEVELOPMENT_AND_SUPPORT">DEVELOPMENT 582 AND SUPPORT</a></h1> 583 <p class="Pp">Contributions are always welcome! All source code is available at 584 https://code.in0rdr.ch/diary.</p> 585 <p class="Pp">For question and support visit 586 https://web.libera.chat/gamja/#p0c.</p> 587 </section> 588 <section class="Sh"> 589 <h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> 590 <ul class="Bl-bullet"> 591 <li>Andreas Gruhler</li> 592 <li>Matthias Beyer</li> 593 <li>Johnathan Jenkins</li> 594 <li>Yu-Jie Lin</li> 595 <li>Balduin Dettling</li> 596 <li>Avindra Goolcharan</li> 597 <li>Oliver Blanthorn</li> 598 <li>Jonny Burger</li> 599 </ul> 600 </section> 601 <section class="Sh"> 602 <h1 class="Sh" id="LICENSE"><a class="permalink" href="#LICENSE">LICENSE</a></h1> 603 <p class="Pp">MIT License, https://code.in0rdr.ch/diary/file/LICENSE.html</p> 604 </section> 605 </div> 606 <table class="foot"> 607 <tr> 608 <td class="foot-date">2025-02-04</td> 609 <td class="foot-os"></td> 610 </tr> 611 </table> 612 </body> 613 </html>