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
|
|
|
|
```sh
|
2022-08-24 22:21:13 +05:00
|
|
|
python3 histd.py
|
2022-08-19 17:31:51 +05:00
|
|
|
```
|
2022-08-24 22:21:13 +05:00
|
|
|
|
|
|
|
## Installation
|
2022-10-03 18:40:37 +05:00
|
|
|
Recommended method
|
2022-08-19 17:31:51 +05:00
|
|
|
```sh
|
2022-10-03 18:35:56 +05:00
|
|
|
sudo cp histd.py /usr/local/bin/histd
|
2022-08-19 17:31:51 +05:00
|
|
|
```
|
2022-10-03 18:40:37 +05:00
|
|
|
|
|
|
|
Risky way (without cloning the repository)
|
|
|
|
```sh
|
|
|
|
sudo curl -o /usr/local/bin/histd "https://raw.githubusercontent.com/ordinary-dev/histd/master/histd.py"
|
|
|
|
```
|
|
|
|
|
2022-10-03 18:35:56 +05:00
|
|
|
To create a new note, you can simply type `histd` in the terminal.
|
2022-10-03 18:28:49 +05:00
|
|
|
|
|
|
|
## Backup
|
|
|
|
To create an archive of all notes, run the following commands:
|
|
|
|
```sh
|
|
|
|
cd ~/.local/share
|
|
|
|
tar -cJf histd.tar.xz histd
|
|
|
|
```
|
|
|
|
|
|
|
|
## Merge all notes
|
|
|
|
This command concatenates all files and prefixes each with the creation date.
|
|
|
|
```sh
|
|
|
|
for f in ~/.local/share/histd/**/*.md; do echo $f | sed 's/^.*histd\//# /'; cat "${f}"; echo; done
|
|
|
|
```
|