Add example usage for the log functionality
This commit is contained in:
parent
7a364639ee
commit
0865984d6f
1 changed files with 28 additions and 3 deletions
|
@ -6,10 +6,35 @@ It is intended as a tumbeblog-like diary, where one does not care to fire up
|
||||||
an editor and type in a long text, but rather type a few words and forget
|
an editor and type in a long text, but rather type a few words and forget
|
||||||
about it:
|
about it:
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
Logs can be created via an entry in the configuration file in the section `log`:
|
||||||
|
|
||||||
```
|
```
|
||||||
imag log --to work "Copying large amounts of data takes time"
|
[log]
|
||||||
|
logs = ["work", "hobby", "music"]
|
||||||
|
default = "hobby"
|
||||||
```
|
```
|
||||||
|
|
||||||
Everything which can be done with `imag-log` can also be done with
|
The `default` key is required and the name which is used here _must_ appear in
|
||||||
`imag-diary`.
|
the `logs` array.
|
||||||
|
|
||||||
|
In the above configuration snippet, the logs `work`, `hobby` and `music` are
|
||||||
|
created. The user may now log to one of these logs with:
|
||||||
|
|
||||||
|
```
|
||||||
|
imag log --to <logname> "Some message"
|
||||||
|
# or
|
||||||
|
imag log -t <logname> "Some message"
|
||||||
|
# or, to the default log:
|
||||||
|
imag log "Some message"
|
||||||
|
```
|
||||||
|
|
||||||
|
Logs can be read by naming the log:
|
||||||
|
|
||||||
|
```
|
||||||
|
imag log show work
|
||||||
|
```
|
||||||
|
|
||||||
|
which prints one log per line (including time it was logged).
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue