mj 0.2.3

My Journal - personal tool to capture ideas, work with journals and notes in your favourite text $EDITOR.
Documentation
# My Journal

*My Journal* is a productivity tool that will help you manage your daily ideas,
journals and notes. *My Journal* is nothing else but a thin layer atop your
default editor that it will use to organize your textual notes in a clean and
yet open structure of directories.

## Initialize new repository

To initialize a new repository, ask *My Journal* to do the following:

```bash
mkdir -p ~/MyJournals/demo
cd ~/MyJournals/demo
mj init .
```

This will produce initial directory structure (very minimal):

```
.
├── ideas
├── journals
└── notes
```

## Authoring ideas

*My Journal* will also help authoring ideas, journals and notes. Let's see how
it works for ideas:

```bash
mj idea edit super-project
```

This will open your default `$EDITOR` such that you can write down what is it
your new idea constitutes from. After you save it and exit your editor, *My
Journal* will make sure your new idea is stored in your repository in the right
structure:

```
.
├── ideas
│   └── super-project.md
├── journals
└── notes
```

To continue adding to your idea you can type in the same `edit` command:

```bash
mj idea edit super-project
```

And, finally to remove an idea you can do either `edit` and wipe out the
content followed by saving the file (*My Journal* will take care of deleting
empty files for you), or by calling `remove` command like following:

```bash
mj idea remove super-project
```

To list registered ideas just type in the following:

```bash
mj ideas list
```

> Note, that `i`, `idea` and `ideas` are synonims, and can be used interchangeably.

## Authoring journals

Journals are handled slightly differently by *My Journal*. Let's see how it
works:

```bash
mj journal edit
```

This will open your default `$EDITOR` such that you can write down what is it
you want to be written down for today. After you save it and exit your editor,
*My Journal* will make sure your **todays** journal record is stored in your
repository in the right structure (assuming that `today` for me is `2019-10-02`
at the moment):

```
.
├── ideas
├── journals
│   └── 2019-10-02
│       └── journal.md
└── notes
```

To continue adding to your todays journal you can type in the same `edit`
command:

```bash
mj journal edit
```

In case you might want to author a journal for another day, it is possible with
the following command:

```bash
mj journal edit 1d
```

This will let you work on your yesturdays journal. In case you want specific
date, you can always do that:

```bash
mj journal edit 2019-09-04
```

This will naturally let you work on your journal from `2019-09-04`.

And, finally to remove a journal from a specific date you can do either `edit`
and wipe out the content followed by saving the file (*My Journal* will take
care of deleting empty files for you), or by calling `remove` command like
following:

```bash
mj journal remove 1d
```

This will remove yesturdays journal (here you can use specific dates as well if
you wish). Or you can remove todays journal with the following command:

```bash
mj journal remove
```

To list registered journals in an descending order of registration just type in
the following:

```bash
mj journals list
```

> Note, that `j`, `journal` and `journals` are synonims, and can be used
> interchangeably.


## Authoring notes

Notes are handled differently from *ideas* and *journals*. Let's see how it
works:

```bash
mj note edit algorithms sieve-of-eratosthenes
```

This will open your default `$EDITOR` such that you can write down what is it
you want to be written down for the subject *Sieve of Eratosthenes* in the
category *Algorithms*. After you save it and exit your editor, *My Journal*
will make sure your note is stored in your repository in the right structure:

```
.
├── ideas
├── journals
└── notes
    └── algorithms
        └── sieve-of-eratosthenes.md
```

To continue adding to your note you can type in the same `edit` command:

```bash
mj note edit algorithms sieve-of-eratosthenes
```

And, finally to remove a note from a specific category you can do either `edit`
and wipe out the content followed by saving the file (*My Journal* will take
care of deleting empty files for you), or by calling `remove` command like
following:

```bash
mj note remove algorithms sieve-of-eratosthenes
```

To list all existing notes across all the categories just type in the
following:

```bash
mj notes list --all
```

To list existing categories just type in the following:

```bash
mj notes list --categories
```

And, finally, to list notes from a specific category, just run the following:

```bash
mj notes list algorithms
```

> Note, that `n`, `note` and `notes` are synonims, and can be used
> interchangeably.

## Completion scripts for your shell

To make things easier *My Journal* let's you generate completion scripts for
one of the supported shells: Bash, Fish, Zsh, PowerShell or Elvish.

In order to enable *My Journal* completion for your shell, it is possible to
just run one of the following commands:

```bash
source <(mj completion bash)
source <(mj completion fish)
source <(mj completion zsh)
source <(mj completion powershell)
source <(mj completion elvish)
```