histd/readme.md

60 lines
1.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
Make sure the `EDITOR` environment variable is set
to the name of your favorite text editor.
If it's not, edit the `~/.bashrc` file (or `~/.zshrc`)
```bash
export EDITOR=nano
```
Then 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
```
2022-10-03 18:28:49 +05:00
## Backup
2022-12-03 19:49:57 +05:00
To create an archive of all notes, run the following command:
```bash
2023-02-16 23:27:28 +05:00
./histd.sh backup
2022-10-03 18:28:49 +05:00
```
Required programs: `tar`, `xz`.
2022-10-03 18:28:49 +05:00
## Merge all notes
2022-12-15 22:25:44 +05:00
This command concatenates all files and prefixes each with the filename.
```bash
2023-02-16 23:27:28 +05:00
./histd.sh merge
2022-10-03 18:28:49 +05:00
```
## List all notes
```bash
./histd.sh list
# /home/user/.local/share/histd
# └── 2022
# └── 08
# ├── 18.md
# └── 19.md
```
Required programs: `tree`