summaryrefslogtreecommitdiff
path: root/README.md
blob: c339e227ff79e184b3a2f1fc01cf64dd105dcbd9 (plain)
    1 README
    2 ======
    3 
    4 **Journal-tools** is a simple set of applications to quickly keep notes for the
    5 activities of each day or week. The journal entries are automatically named so
    6 they are consistent and predictable.
    7 
    8 If `dailyjournal` or `weeklyjournal` are executed and no entry for the relevant
    9 time period exists, one is created from the journal template file; if an entry
   10 does already exist, it is reopened for editing.
   11 
   12 Setup
   13 -----
   14 
   15 To get set up, you will need to create a journal directory for the tool you
   16 wish to use. The default paths are (see `Environment Variables` for overrides):
   17 
   18 * `dailyjournal`: `~/Documents/Journal`
   19 * `weeklyjournal`: `~/Documents/Journal/Weekly`
   20 
   21 These commands will however error out if the environment is not set up
   22 correctly, offering helpful errors to get you started.
   23 
   24 Templates
   25 ---------
   26 
   27 The `dailyjournal` and `weeklyjournal` commands support template files for each new note.
   28 **By default**, the template file is `.template.md` within the relevant
   29 command's journal directory. At runtime, the template file will be copied into
   30 place if a matching note for the time window does not already exist. The
   31 template copy process will not overwrite existing data.
   32 
   33 Environment Variables
   34 ---------------------
   35 
   36 There are several environment variables that can be used to override default
   37 functionality if desired. Not everyone loves capital letters in their paths.
   38 
   39 * **DAILYJOURNAL_DIR**: Path to the directory for daily journal entries. _Default: ~/Documents/Journal_
   40 * **DAILYJOURNAL_EXT**: Extension of daily journal entries. _Default: md_
   41 * **WEEKLYJOURNAL_DIR**: Path to the directory for weekly journal entries. _Default: ~/Documents/Journal/Weekly_
   42 * **WEEKLYJOURNAL_EXT**: Extension of weekly journal entries. _Default: md_
   43 
   44 **NOTE**: The above variables impact where template files are read from. If the
   45 extension is changed, for example to `adoc`, the template filename will become
   46 `.template.adoc`.
   47 
   48 
   49 Usage
   50 -----
   51 
   52 ```
   53 dailyjournal [+/-<days>]
   54 weeklyjournal [+/-<weeks>]
   55 ```
   56 
   57 For the most simple usage, type `dailyjournal` to open today's journal (or
   58 `weeklyjournal` to open this weeek's journal).
   59 
   60 To open yesterday's entry, type `dailyjournal -1`, and to open two days ago
   61 type `dailyjournal -2`, etc. The same applies for `weeklyjournal`, but the
   62 argument is by week rather than by day.
   63 
   64 **NOTE**: When using negative numbers, daily does not calculate days, rather
   65 entries. In other words, `-1` is not one day ago, but one entry ago.  This is
   66 to make it easier to open previous entries without needing to know how many
   67 days back they are.
   68 
   69 For example, if it is Monday and you want to open Friday's entry, and no
   70 entries were made over the weekend, type `dailyjournal -1` and Friday's entry
   71 will be opened (1 entry back). Continuing in this scenario, if an entry exists
   72 on Thursday, typing `dailyjournal -2` on Monday will open Thursday's entry
   73 (again, assuming no weekend entries are present). Friday is one back, Thursday
   74 is two back, Wednesday is three back, etc.

Generated by cgit