-
Notifications
You must be signed in to change notification settings - Fork 1
/
jrnlc.1
147 lines (140 loc) · 3.82 KB
/
jrnlc.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
.\"
.\" Copyright (c) 2021-22 Matthias Schmidt
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\"
.Dd July 07, 2022
.Dt JRNLC 1
.Sh NAME
.Nm jrnlc
.Nd Command line journaling tool
.Sh SYNOPSIS
.Nm jrnlc
.Op Fl adeV
.Op Fl B Ar file
.Op Fl D Ar number
.Op Fl I Ar number
.Op Fl I Ar number
.Sh DESCRIPTION
.Nm
is an opinionated command line journaling tool.
You can take notes by entering them directly on the command line or by feeding
a text file via standard input to
.Nm .
If wanted, you can encrypt your journal so that your notes remain secret.
.Pp
The options are as follows:
.Bl -tag -width numbernumb
.It Fl a
Show all journal entries.
.It Fl B
Print an unecrypted backup of the journal to stderr.
You can combine this option with other ones.
.It Fl d
Decrypt an encrypted journal.
.It Fl D Ar number
Delete the journal entry with the given
.Ar number .
.It Fl e
Encrypt an unecrypted journal.
.It Fl I Ar number
Show only the entry with the given
.Ar number .
.It Fl n Ar n
Show only the last
.Ar n
entries.
.It Fl V
Show the version number.
.El
.Pp
If not arguments are provided
.Nm
provides the user with an input prompt to enter a journal entry.
See the examples section below on how to use
.Nm .
.Sh ENVIRONMENT
.Nm
makes use of the following environment variables.
.Bl -tag -width XDG_CONFIG_HOME
.It Ev HOME
If the
.Ev XDG_CONFIG_HOME
variable is not set,
.Nm
stores the journal and other data in the
.Pa .config/jrnlc
subdirectory in the user's home directory.
.It Ev XDG_CONFIG_HOME
In case this variable is set,
.Nm
stores the journal and other data in the
.Pa jrnlc
subdirectory under the path set by this environment variable.
.El
.Sh EXIT STATUS
.Nm
normally exists with 0 or with 1 if an error occurred.
.Sh EXAMPLES
The following examples show how to use
.Nm .
.Pp
Create a new journal entry on the command line.
Provide one title line, followed by a blank line and end with Ctrl+d on a
blank line.
.Bd -literal -offset indent
$ jrnlc
[One title line, one blank line, then the body. End with ^D on a blank line]
Test title line
And here's the content
.Ed
.Pp
The next command shows the last two journal entries:
.Bd -literal -offset indent
$ jrnlc -n 2
[2021-12-11 15:09] Vel ut dolorem earum ratione.
Id dolorem ducimus quis consectetur corrupti vitae.
Modi corrupti incidunt repellat magni et nihil.
Ea similique qui commodi possimus est.
[2021-12-11 15:32] test title line
and here's the content
.Ed
.Pp
Create a new journal entry from a file.
This way you can create your entry in your text editor of choice and simply
import it into jrnlc.
.Bd -literal -offset indent
$ cat sample_entry.txt
Vel ut dolorem earum ratione.
Id dolorem ducimus quis consectetur corrupti vitae.
Modi corrupti incidunt repellat magni et nihil.
Ea similique qui commodi possimus est.
$ jrnlc < sample_entry.txt
[One title line, one blank line, then the body. End with ^D on a blank line]
$
.Ed
.Pp
Encrypt the journal using a password.
Choose a good and strong password and remember it well (or use a password
manager).
.Bd -literal -offset indent
$ jrnlc -e
Encrypting journal...
Enter Password:
Enter Password again:
.Ed
.Sh AUTHORS
.Nm
was written by
.An Matthias Schmidt Aq Mt xhr@giessen.ccc.de .