diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..c339e22 --- /dev/null +++ b/README.md @@ -0,0 +1,74 @@ +README +====== + +**Journal-tools** is a simple set of applications to quickly keep notes for the +activities of each day or week. The journal entries are automatically named so +they are consistent and predictable. + +If `dailyjournal` or `weeklyjournal` are executed and no entry for the relevant +time period exists, one is created from the journal template file; if an entry +does already exist, it is reopened for editing. + +Setup +----- + +To get set up, you will need to create a journal directory for the tool you +wish to use. The default paths are (see `Environment Variables` for overrides): + +* `dailyjournal`: `~/Documents/Journal` +* `weeklyjournal`: `~/Documents/Journal/Weekly` + +These commands will however error out if the environment is not set up +correctly, offering helpful errors to get you started. + +Templates +--------- + +The `dailyjournal` and `weeklyjournal` commands support template files for each new note. +**By default**, the template file is `.template.md` within the relevant +command's journal directory. At runtime, the template file will be copied into +place if a matching note for the time window does not already exist. The +template copy process will not overwrite existing data. + +Environment Variables +--------------------- + +There are several environment variables that can be used to override default +functionality if desired. Not everyone loves capital letters in their paths. + +* **DAILYJOURNAL_DIR**: Path to the directory for daily journal entries. _Default: ~/Documents/Journal_ +* **DAILYJOURNAL_EXT**: Extension of daily journal entries. _Default: md_ +* **WEEKLYJOURNAL_DIR**: Path to the directory for weekly journal entries. _Default: ~/Documents/Journal/Weekly_ +* **WEEKLYJOURNAL_EXT**: Extension of weekly journal entries. _Default: md_ + +**NOTE**: The above variables impact where template files are read from. If the +extension is changed, for example to `adoc`, the template filename will become +`.template.adoc`. + + +Usage +----- + +``` +dailyjournal [+/-<days>] +weeklyjournal [+/-<weeks>] +``` + +For the most simple usage, type `dailyjournal` to open today's journal (or +`weeklyjournal` to open this weeek's journal). + +To open yesterday's entry, type `dailyjournal -1`, and to open two days ago +type `dailyjournal -2`, etc. The same applies for `weeklyjournal`, but the +argument is by week rather than by day. + +**NOTE**: When using negative numbers, daily does not calculate days, rather +entries. In other words, `-1` is not one day ago, but one entry ago. This is +to make it easier to open previous entries without needing to know how many +days back they are. + +For example, if it is Monday and you want to open Friday's entry, and no +entries were made over the weekend, type `dailyjournal -1` and Friday's entry +will be opened (1 entry back). Continuing in this scenario, if an entry exists +on Thursday, typing `dailyjournal -2` on Monday will open Thursday's entry +(again, assuming no weekend entries are present). Friday is one back, Thursday +is two back, Wednesday is three back, etc. |