histd/readme.md

66 lines
2 KiB
Markdown
Raw Normal View History

2022-08-19 17:31:51 +05:00
# How I spent this day
A simple but useful personal diary application.
The sole purpose of this application is to quickly create a file
and open it in a text editor so that I can take a note before I lose my desire.
2022-09-25 14:01:34 +05:00
Notes can be found in the `~/.local/share/histd` directory.
2022-08-19 17:31:51 +05:00
```sh
2022-09-25 14:01:34 +05:00
tree ~/.local/share/histd
# /home/user/.local/share/histd
2022-08-19 17:31:51 +05:00
# └── 2022
# └── 08
2022-10-02 15:10:19 +05:00
# ├── 18.md
# └── 19.md
2022-08-19 17:31:51 +05:00
```
## Usage
Mark this script as executable:
2022-12-16 21:36:48 +05:00
```bash
2023-02-16 23:27:28 +05:00
chmod +x histd.sh
```
Now you can create your first note:
```bash
2023-02-16 23:27:28 +05:00
./histd.sh
2022-10-03 18:40:37 +05:00
```
2023-03-13 00:16:14 +05:00
This command can be run as many times as you want, it will open the same file until the day is over.
You can open the last note with the command:
```bash
./histd.sh last
```
## Editor configuration
When opening a text editor, the program checks the value of the `EDITOR` environment variable.
If you want to use a different editor, edit the `~/.bashrc` file (if you are using bash):
```bash
export EDITOR=nano
```
Don't forget to start a new session or execute the following command:
```bash
source ~/.bashrc
```
2023-11-06 00:24:10 +05:00
## Commands
| Command | Description | Dependencies |
| --- | --- | --- |
| | Create a new note file if it does not exist and open it in a text editor. | |
| `last` | Open the most recently created note. | |
| `backup` | Creates an archive with all notes. | `tar`, `xz` |
| `merge` | Combine all notes into one file. Each note is preceded by a file name. | |
| `list` | Displays a tree of all notes. | `tree` |
| `help` | Show usage information. | |
2023-11-06 00:27:30 +05:00
## Project status
The project is completed, but not abandoned. Improvements are welcome.