2024-03-15 18:34:24 +03:00
|
|
|
# 🌺 Hibiscus.txt
|
|
|
|
|
2024-03-15 19:22:22 +03:00
|
|
|
Simple plaintext diary.
|
2024-03-15 18:34:24 +03:00
|
|
|
|
2024-03-17 18:11:20 +03:00
|
|
|
This project is *very* opinionated and minimal, and is designed primarily for my usage.
|
2024-04-23 21:24:11 +03:00
|
|
|
As a result, I can't guarantee that it's either secure or stable.
|
2024-03-15 20:20:33 +03:00
|
|
|
|
2024-03-15 18:34:24 +03:00
|
|
|
## Features:
|
2024-03-26 14:44:58 +03:00
|
|
|
* Each day, you get a text file. You have until 23:59 of that very day to finalise it.
|
2024-04-23 23:18:06 +03:00
|
|
|
* You can save named notes to document milestones, big events, or just a nice game you played this month
|
2024-04-23 21:24:11 +03:00
|
|
|
* You can easily export entire `data` dir in a `.zip` archive for backups
|
2024-03-15 20:20:33 +03:00
|
|
|
|
2024-03-17 18:26:13 +03:00
|
|
|
* Everything is plain(text) and simple. No databases, encryption, OAuth, or anything fancy. Even the password is plainte- *wait is this a feature?*
|
2024-03-26 14:44:58 +03:00
|
|
|
* Docker support (in fact, that's probably the best way to run this)
|
|
|
|
* Optional Telegram notifications for failed login attempts
|
2024-03-17 18:26:13 +03:00
|
|
|
|
2024-04-23 21:24:11 +03:00
|
|
|
## Technical details
|
|
|
|
You can read a relevant entry in my blog [here](https://a71.su/notes/hibiscus/).
|
|
|
|
It provides some useful information and context for why this app exists in the first place.
|
2024-05-04 23:16:53 +03:00
|
|
|
There is also a [TODO.md](./TODO.md) file that shows what I will (or *may*) change in the future.
|
|
|
|
This repository is [mirrored to GitHub](https://github.com/Andrew-71/hibiscus) in case my server goes down.
|
2024-04-23 21:24:11 +03:00
|
|
|
|
|
|
|
### Data format:
|
2024-03-17 18:26:13 +03:00
|
|
|
```
|
|
|
|
data
|
|
|
|
+-- day
|
|
|
|
| +-- yyyy-mm-dd.txt (ISO 8601)
|
|
|
|
| ...
|
|
|
|
+-- notes
|
|
|
|
| +-- note1.txt
|
|
|
|
| +-- note2.txt
|
|
|
|
| ...
|
|
|
|
+-- readme.txt
|
2024-03-18 19:33:57 +03:00
|
|
|
|
|
|
|
config
|
|
|
|
+-- config.txt
|
2024-04-23 21:24:11 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
### Config options:
|
|
|
|
Below are defaults of config.txt. The settings are defined in newline separated key=value pairs.
|
2024-05-04 15:39:15 +03:00
|
|
|
Please don't include the bash-style "comments" in your actual config,
|
2024-04-23 21:24:11 +03:00
|
|
|
they are provided purely for demonstration only and **will break the config if present**.
|
|
|
|
```
|
|
|
|
username=admin # Your username
|
|
|
|
password=admin # Your password
|
|
|
|
port=7101 # What port to run on (probably leave on 7101 if using docker)
|
2024-05-03 15:40:40 +03:00
|
|
|
timezone=Local # IANA Time zone database identifier ("UTC", Local", "Europe/Moscow" etc.), Defaults to Local if can't parse.
|
|
|
|
language=en # ISO-639 language code (currently supported - en, ru)
|
2024-05-04 15:39:15 +03:00
|
|
|
log_to_file=false # Whether to write logs to a file
|
|
|
|
log_file=config/log.txt # Where to store the log file if it is enabled
|
2024-04-23 21:24:11 +03:00
|
|
|
enable_scram=false # Whether the app should shut down if there are 3 or more failed login attempts within 100 seconds
|
|
|
|
|
|
|
|
# Not present by default, set only if you want to be notified of any failed login attempts over telegram
|
|
|
|
tg_token=tgtoken
|
|
|
|
tg_chat=chatid
|
|
|
|
```
|
|
|
|
|
|
|
|
### Docker deployment:
|
|
|
|
Due to project's simplicity ~~and me rarely using them~~ there are no image tags, I just use `latest` and push to it.
|
2024-04-30 23:35:00 +03:00
|
|
|
The [package](https://git.a71.su/Andrew71/hibiscus/packages) provided in this repository is for `linux/amd64` architecture,
|
2024-05-01 00:22:23 +03:00
|
|
|
and there is a [Dockerfile](./Dockerfile) in case you want to compile for something rarer (like a Pi).
|
|
|
|
This repo contains the [compose.yml](./compose.yml) that I personally use.
|
2024-04-23 21:24:11 +03:00
|
|
|
|
|
|
|
### Executable flags
|
|
|
|
If you for some reason decide to run plain executable instead of docker, it supports following flags:
|
|
|
|
```
|
|
|
|
-config string
|
|
|
|
override config file location
|
|
|
|
-user string
|
|
|
|
override username
|
|
|
|
-pass string
|
|
|
|
override password
|
|
|
|
-port int
|
|
|
|
override port
|
2024-05-04 14:29:49 +03:00
|
|
|
-debug
|
|
|
|
show debug log
|
2024-03-17 18:26:13 +03:00
|
|
|
```
|