Skip to content

Commit 0a276ed

Browse files
committed
Update docs and README for --print-config.
Clean up the README and add suitable links(to the webpage)
1 parent e61c2c0 commit 0a276ed

2 files changed

Lines changed: 52 additions & 86 deletions

File tree

README.md

Lines changed: 9 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@
77
Many similar tools exist, but this was sort of a learning project(for rust), and
88
none of them met all the requirements I was looking for in a `jrnl`-ing system.
99

10+
## Visit the Webpage
11+
12+
Visit the relevant webpage [here](https://kajuburfi.github.io/jrnl/) to view the
13+
- [Video Demo](https://kajuburfi.github.io/jrnl/#videoDemo) in case it doesn't work here.
14+
- [Features](https://kajuburfi.github.io/jrnl/#features) in detail.
15+
- [Usage](https://kajuburfi.github.io/jrnl/#usage), on how to properly use it(in detail).
16+
1017
## Demo
18+
> Visit the website [here](https://kajuburfi.github.io/jrnl/#videoDemo) in case it doesn't work here.
1119
1220
https://github.com/user-attachments/assets/ed63f1c8-8ef2-4dc6-a1a4-02f20681abbe
1321

1422
## Features(in brief)
23+
> Visit the [webpage](https://kajuburfi.github.io/jrnl/#features) to see the detailed features.
1524
1625
- All data is stored in markdown format(so **nothing** is _encrypted_).
1726
- You can have multiple different `jrnl_folder`s, for different purposes, and can use any one from any
@@ -38,90 +47,6 @@ cargo install --git https://github.com/kajuburfi/jrnl --locked
3847

3948
> Note: This is meant for my personal use, and so many things are hardcoded. Use at your own risk.
4049
41-
## Features
42-
- Arranges entries of each day such that a month of entries is stored in a file.
43-
File structure(tree):
44-
```
45-
Template | Example
46-
|
47-
jrnl_folder | jrnl_folder
48-
'- YYYY | '- 2025
49-
| '- YYYY_MM.md | | '- 2025_01.md
50-
| '- YYYY_MM.md | | '- 2025_02.md
51-
'- YYYY | '- 2026
52-
| '- YYYY_MM.md | | '- 2026_01.md
53-
| '- YYYY_MM.md | | '- 2026_02.md
54-
```
55-
- Just by running `jrnl` with no flags opens the current day's entry in your text editor.
56-
Automatically fills in the date - weekday and time is configurable.
57-
- General entry format:
58-
```
59-
Template | Example
60-
### WEEKDAY (HH:MM:SS) | ### FRI (13:05:28)
61-
# YYYY-MM-DD | # 2025-03-28
62-
- [tag] entry | - [milestone] [game] Played and won 200th game of chess.
63-
- entry | - Cleaned up room.
64-
- [tag1] [tag2] entry | - [fees] Paid electricity bill.
65-
```
66-
- All entries are in standard markdown, for ease of reading.
67-
- Entries of any date can be fetched and pretty-printed to the terminal.
68-
- Any given entry can be opened with the text editor at that date, in case of any editing required.
69-
- Tags are implemented; one can search for all occurances of a tag in a given month or year.
70-
When searched for, a table is printed, with the dates and respective entries that contain
71-
the given tag. The tag is highlighted. Further, a calendar of the current month(or months - if in a year)
72-
is printed, with the dates of the tags used being highlighted.
73-
```
74-
╭───────────────┬──────────────────────────────────────────╮
75-
│ Date of Entry ┆ Record │
76-
╞═══════════════╪══════════════════════════════════════════╡
77-
│ 2025-03-31 ┆ [tag_1] Stuff │
78-
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
79-
│ 2025-03-29 ┆ [tag_1] Some more │
80-
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
81-
│ 2025-03-28 ┆ [tag_1] Other things │
82-
╰───────────────┴──────────────────────────────────────────╯
83-
March 2025
84-
Mo Tu We Th Fr Sa Su
85-
1 2
86-
3 4 5 6 7 8 9
87-
10 11 12 13 14 15 16
88-
17 18 19 20 21 22 23
89-
24 25 26 27 28 29 30
90-
31
91-
```
92-
(Note: Here, the colors cannot be shown, so you'll have to trust this.)
93-
- A special tag - `food` is pre-defined. Input your daily food intake as:
94-
```
95-
- [food] Breakfast | Lunch | Dinner | Other
96-
<!-- Example -->
97-
- [food] some breakfast item | A lunch item - course 1 A lunch item - course 2 A lunch item - course 3 | A filling dinner. A tasty dinner. | Snack - Chips Fruit - Mango
98-
```
99-
When fetching the tag through `--tag food`, you get a nice ascii table(along with a calendar - not shown here):
100-
```
101-
╭───────────────┬─────────────────────┬─────────────────────────┬───────────────────┬────────────────╮
102-
│ Date of Entry ┆ Breakfast ┆ Lunch ┆ Dinner ┆ Other │
103-
╞═══════════════╪═════════════════════╪═════════════════════════╪═══════════════════╪════════════════╡
104-
│ 2025-03-27 ┆ some breakfast item ┆ A lunch item - course 1 ┆ A filling dinner. ┆ Snack - Chips │
105-
│ ┆ ┆ A lunch item - course 2 ┆ A tasty dinner. ┆ Fruit - Mango │
106-
│ ┆ ┆ A lunch item - course 3 ┆ ┆ │
107-
╰───────────────┴─────────────────────┴─────────────────────────┴───────────────────┴────────────────╯
108-
```
109-
- If there are too many entries for a tag or for the food tag(specifically), it will automatically open
110-
a pager with the contents(configurable).
111-
- To fetch entries(or open them), a date is required. You can either pass this through the flag `--entry YYYY-MM-DD`
112-
(`-e YYYY-MM-DD`), or if you just pass an empty flag(`-e`), an interactive calendar will prompt for the
113-
date(Using [inquire](https://github.com/mikaelmello/inquire)). The calendar will also open if there is any
114-
problem with reading the date.
115-
- When fetching tags, the default file to search for is the current month's file. However, you can specify any other
116-
file using `--year YYYY`(`-y YYYY`) or `--month MM`(`-m MM`). If only provided with a year, and no month, all files
117-
of that year will be searched through and printed chronologically.(The pager comes in use here)
118-
- A feature of "generating reports" is implemented. Currently, it goes through a file, and prints the number of entries
119-
of that month, and the most used tags. Similar to tags, you can specify the month and/or year to get a specific month's
120-
report.
121-
- All tables are automatically wrapped around if its width exceeds 90% of the terminal width.
122-
- Calendars are printed in tags and generating reports, with highlighting.
123-
The calendars of each month will be printed in a grid-like form, extending rightwards depending
124-
on your terminal's width.
12550

12651
## Configuration
12752

docs/index.html

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h1 id="videoDemo"> Video Demo </h1>
4040
<p> A sample video showing most of the functionalities of this tool with a dummy input </p>
4141
<video width=100% height=100% controls> <source src="video.mp4" type="video/mp4"> </video>
4242

43-
<h1> Features </h1>
43+
<h1 id="features"> Features </h1>
4444
<ul>
4545
<li>Arranges entries of each day such that a month of entries is stored in a file.
4646
File structure(tree):
@@ -132,7 +132,7 @@ <h1> Features </h1>
132132
on your terminal's width. </li>
133133
</ul>
134134

135-
<h1> Usage </h1>
135+
<h1 id="usage"> Usage </h1>
136136
<p> This is a quite detailed explanation of what I made this tool for and how to use it to get the most out of it </p>
137137
<p> Once <a href="https://github.com/kajuburfi/jrnl/tree/master?tab=readme-ov-file#installation">installed</a>, run <code>jrnl -V</code>. You should get the version printed out. </p>
138138

@@ -246,6 +246,47 @@ <h2><code>--path</code> or <code>-p</code></h2>
246246
Here, if you provide the <i>"path"</i>, it will use that. If you don't, it will search for <code>jrnl_folder</code> in
247247
the current directory.
248248

249+
<h2><code>--print-config</code></h2>
250+
This prints the current configuration in a nice table format.
251+
Sample output, for the default config:(Colors can't be shown)
252+
<pre><code class="lang-plaintext">CONFIGURATION
253+
╭──────────────────────────────┬─────────╮
254+
│ Quantities ┆ Value │
255+
╞══════════════════════════════╪═════════╡
256+
│ Add Weekday ┆ true │
257+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
258+
│ Add Food Column ┆ true │
259+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
260+
│ Add timestamp ┆ true │
261+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
262+
│ Default Editor ┆ hx │
263+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
264+
│ Default Pager ┆ bat │
265+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
266+
│ Max rows to display for tags ┆ 5 │
267+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
268+
│ When to use pager ┆ default │
269+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
270+
│ Default path ┆ ~ │
271+
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
272+
│ Approximation sensitivity ┆ 1 │
273+
╰──────────────────────────────┴─────────╯</code></pre>
274+
275+
<h1>Dependencies</h1>
276+
<ol>
277+
<li><a href="https://github.com/chronotope/chrono"><code>chrono</code></a>: For date and time purposes.</li>
278+
<li><a href="https://github.com/clap-rs/clap"><code>clap</code></a>: For CLI arguments.</li>
279+
<li><a href="https://github.com/colored-rs/colored"><code>colored</code></a>: For colored messages.</li>
280+
<li><a href="https://github.com/mikaelmello/inquire"><code>inquire</code></a>: To interactively get the date(of entry to be fetched) from the user.</li>
281+
<li><a href="https://docs.rs/pager/latest/pager/"><code>pager</code></a>: To page long outputs.</li>
282+
<li><a href="https://github.com/Nukesor/comfy-table"><code>comfy-table</code></a>: To print tables.</li>
283+
<li><a href="https://docs.rs/toml/latest/toml/"><code>toml</code></a>: To parse the configuration file.</li>
284+
<li><a href="https://serde.rs/"><code>serde</code></a>: For use in <code>toml</code> and <code>clap</code>.</li>
285+
<li><a href="https://docs.rs/term_size/latest/term_size/"><code>term_size</code></a>: To get the terminal width, to be able to wrap tables and calendars accordingly.</li>
286+
<li><a href="https://docs.rs/stringmetrics/latest/stringmetrics/"><code>stringmetrics</code></a>: For <i>approximate</i> word searching.</li>
287+
<li><a href="https://docs.rs/shellexpand/latest/shellexpand/"><code>shellexpand</code></a>: To expand the <code>~</code>(tilde) in paths.</li>
288+
</ol>
289+
249290
<h1>Any other doubts/questions?</h1>
250291
Feel free to open an <a href="https://github.com/kajuburfi/jrnl/issues">issue</a>.
251292

0 commit comments

Comments
 (0)