Improve documentation
This commit is contained in:
parent
ab4cccee18
commit
0a391984f3
2 changed files with 59 additions and 4 deletions
58
README.md
58
README.md
|
@ -3,13 +3,13 @@
|
|||
Simple plaintext diary.
|
||||
|
||||
This project is *very* opinionated and minimal, and is designed primarily for my usage.
|
||||
As a result of this, it is also neither secure nor stable.
|
||||
As a result, I can't guarantee that it's either secure or stable.
|
||||
|
||||
## Features:
|
||||
* Each day, you get a text file. You have until 23:59 of that very day to finalise it.
|
||||
* You can save named notes to document milestones, big events, or just a nice game you played this month*
|
||||
* There is also a readme.txt file (just like this one, except you get to write it!)*
|
||||
* You can easily export everything in a zip file for backups
|
||||
* You can easily export entire `data` dir in a `.zip` archive for backups
|
||||
|
||||
* Everything is plain(text) and simple. No databases, encryption, OAuth, or anything fancy. Even the password is plainte- *wait is this a feature?*
|
||||
* Docker support (in fact, that's probably the best way to run this)
|
||||
|
@ -17,7 +17,12 @@ As a result of this, it is also neither secure nor stable.
|
|||
|
||||
*only available through API, subject to change and removal
|
||||
|
||||
## Data format:
|
||||
## 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.
|
||||
There is also [TODO.md](./TODO.md) file that shows what I will (or *may*) change in the future.
|
||||
|
||||
### Data format:
|
||||
```
|
||||
data
|
||||
+-- day
|
||||
|
@ -32,3 +37,50 @@ data
|
|||
config
|
||||
+-- config.txt
|
||||
```
|
||||
|
||||
### Config options:
|
||||
Below are defaults of config.txt. The settings are defined in newline separated key=value pairs.
|
||||
Please don't include the bash-style "comments" in your config,
|
||||
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)
|
||||
timezone=UTC # IANA Time zone database identifier ("UTC", Local", "Europe/Moscow" etc.), Defaults to UTC if can't parse.
|
||||
log_to_file=false # Whether to write logs to a file (located in <config-dir>/log.txt)
|
||||
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.
|
||||
The [package](https://git.a71.su/Andrew71/hibiscus/packages) provided in this repository is for ` linux/amd64` architecture,
|
||||
and there is a [Dockerfile](./Dockerfile) in case you want to compile for something rarer (like a Pi). Below is `compose.yml` that I personally use:
|
||||
```yaml
|
||||
version: "3.8"
|
||||
services:
|
||||
hibiscus:
|
||||
image: git.a71.su/andrew71/hibiscus:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "7101:7101"
|
||||
volumes:
|
||||
- path-to-config-dir/config:/config
|
||||
- path-to-data-dir/data:/data
|
||||
```
|
||||
|
||||
### 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
|
||||
```
|
5
TODO.md
5
TODO.md
|
@ -1,11 +1,14 @@
|
|||
# TODO
|
||||
List of things to add to this project
|
||||
|
||||
* Better docs in case others want to use ths for some reason
|
||||
* Github/Codeberg/whatever mirror for when `faye` (my server) is offline
|
||||
* Improve config and use reflection when loading it
|
||||
* Do to other methods what was done to GetDays/GetNotes?
|
||||
* API revamp
|
||||
* Check export function for improvements
|
||||
* Add note creation and deletion to frontend
|
||||
* Add note creation and deletion to frontend (*properly*)
|
||||
* Customise log file
|
||||
* More slog.Debug and a debug flag?
|
||||
* Consider less clunky auth method
|
||||
* *Go* dependency-less? <-- this is a terrible idea
|
Loading…
Reference in a new issue