.
This commit is contained in:
37
kresus-mrraph/CHANGELOG.md
Normal file
37
kresus-mrraph/CHANGELOG.md
Normal file
@@ -0,0 +1,37 @@
|
||||
## 0.6.2
|
||||
|
||||
- Update woob dependencies install method
|
||||
|
||||
## 0.6.1
|
||||
|
||||
- Remove support for i386 architecture
|
||||
|
||||
## 0.6.0
|
||||
|
||||
- Bump Kresus to 0.19.0
|
||||
|
||||
## 0.5.1
|
||||
|
||||
- Fix AppArmor profile
|
||||
|
||||
## 0.5.0
|
||||
|
||||
- Attempt using `alpine:edge` as base image
|
||||
|
||||
## 0.4.2
|
||||
|
||||
- Fix AppArmor profile
|
||||
|
||||
## 0.4.1
|
||||
|
||||
- Reinstall py3-lxml by default
|
||||
|
||||
## 0.4.0
|
||||
|
||||
- Remove python dependencies from Dockerfile to prevent
|
||||
incompatibility with woob requirements
|
||||
|
||||
## 0.3.0
|
||||
|
||||
- Use `s6-setuidgid` instead of `su-exec`
|
||||
- Set AppArmor in complain mode
|
||||
54
kresus-mrraph/DOCS.md
Normal file
54
kresus-mrraph/DOCS.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Home Assistant Custom Add-on: Kresus
|
||||
|
||||
[Kresus](https://kresus.org/) is an open-source self-hostable Personal Finance Manager.
|
||||
It automatically retrieves your daily bank transactions, lets you categorize them and manage your monthly budgets.
|
||||
|
||||
It relies on [woob](https://gitlab.com/woob/woob) to fetch data from your bank website.
|
||||
|
||||
## Installation
|
||||
|
||||
Kresus requires a PostgreSQL database to store data.
|
||||
If you do not already have a PostgreSQL database installed, you may consider the [PostgreSQL addon](https://github.com/ezlo-picori/hassio-addons/tree/main/postgres).
|
||||
|
||||
The installation of Kresus add-on is quite straightforward and do not differ from the standard installation process for Home-Assistant add-ons:
|
||||
|
||||
1. Click the Home Assistant My button below to open the add-on on your Home
|
||||
Assistant instance.
|
||||
|
||||
[![Open this add-on in your Home Assistant instance.][addon-badge]][addon]
|
||||
|
||||
1. Click the "Install" button to install the add-on.
|
||||
1. Start the "Kresus" add-on.
|
||||
1. Check the logs of the "Kresus" add-on to see if everything
|
||||
went well. A working installation should indicate `Server is ready, let's start the show!`
|
||||
1. Click the "OPEN WEB UI" button to open Kresus UI.
|
||||
|
||||
## Configuration
|
||||
|
||||
The only configuration configurations required are the database connection options.
|
||||
If you used the [PostgreSQL add-on](https://github.com/ezlo-picori/hassio-addons/tree/main/postgres) configured with following options:
|
||||
|
||||
```yaml
|
||||
databases:
|
||||
- kresus_db
|
||||
logins:
|
||||
- password: CHANGEME_kr3sus-p@ssword_CHANGEME
|
||||
username: kresus_user
|
||||
rights:
|
||||
- database: kresus_db
|
||||
username: kresus_user
|
||||
```
|
||||
|
||||
then you may configure kresus with these options:
|
||||
|
||||
```yaml
|
||||
postgres_hostname: homeassistant.local
|
||||
postgres_port: 5432
|
||||
postgres_user: kresus_user
|
||||
postgres_password: CHANGEME_kr3sus-p@ssword_CHANGEME
|
||||
postgres_database: kresus_db
|
||||
```
|
||||
|
||||
## Authors & contributors
|
||||
|
||||
The original setup of this repository is by [Ezlo Picori](https://github.com/ezlo-picori).
|
||||
19
kresus-mrraph/Dockerfile
Normal file
19
kresus-mrraph/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
ARG BUILD_FROM
|
||||
FROM $BUILD_FROM
|
||||
|
||||
COPY requirements.txt /requirements.txt
|
||||
COPY start.sh /usr/libexec/kresus/start.sh
|
||||
|
||||
# Addintional Python Libs
|
||||
RUN pip install -r /requirements.txt && \
|
||||
npm install --omit=dev -g kresus@0.20.0 && \
|
||||
cd /woob && \
|
||||
rm -rf {,.[!.],..?}* && \
|
||||
wget -qO- https://gitlab.com/woob/woob/-/archive/master/woob-master.tar.gz | tar xz --strip-components=1 && \
|
||||
pip3 install --no-cache-dir --prefix .py-deps . && \
|
||||
chown -R kresus:kresus /woob && \
|
||||
chown -R kresus:kresus /etc/kresus && \
|
||||
chown -R kresus:kresus .py-deps woob .ci .gitlab modules tests tools woob.egg-info man weboob icons docs && \
|
||||
chmod 0400 /etc/kresus/config.ini && \
|
||||
chmod 0755 /etc/kresus && \
|
||||
rm -rf {,.[!.],..?}*
|
||||
25
kresus-mrraph/README.md
Normal file
25
kresus-mrraph/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Home Assistant Add-on: Kresus
|
||||
|
||||
Open source personal accounting solution.
|
||||
|
||||
![Supports aarch64 Architecture][aarch64-shield]
|
||||
![Supports amd64 Architecture][amd64-shield]
|
||||
![Supports armhf Architecture][armhf-shield]
|
||||
![Supports armv7 Architecture][armv7-shield]
|
||||
![Supports i386 Architecture][i386-shield]
|
||||
|
||||
## About
|
||||
|
||||
[Kresus][kresus] is a free solution for personal accounting management.
|
||||
It automatically retrieves your daily bank transactions, lets you categorize them
|
||||
and manage your monthly budgets.
|
||||
|
||||
![Kresus Preview][screenshot]
|
||||
|
||||
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
|
||||
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
|
||||
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
|
||||
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
|
||||
[i386-shield]: https://img.shields.io/badge/i386-no-red.svg
|
||||
[screenshot]: https://kresus.org/images/pages/view-all-accounts.png
|
||||
[kresus]: https://kresus.org/
|
||||
12
kresus-mrraph/build.yaml
Normal file
12
kresus-mrraph/build.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
build_from:
|
||||
aarch64: "ghcr.io/ezlo-picori/haos-addon-kresus-aarch64:latest"
|
||||
labels:
|
||||
org.opencontainers.image.title: "Home Assistant Add-on: Kresus Local"
|
||||
org.opencontainers.image.description: "Kresus Local addon"
|
||||
org.opencontainers.image.licenses: "MIT License"
|
||||
io.hass.base.name: alpine
|
||||
args:
|
||||
BASHIO_VERSION: 0.14.3
|
||||
TEMPIO_VERSION: 2021.09.0
|
||||
S6_OVERLAY_VERSION: 3.1.3.0
|
||||
JEMALLOC_VERSION: 5.3.0
|
||||
30
kresus-mrraph/config.yaml
Normal file
30
kresus-mrraph/config.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Kresus Local
|
||||
version: "0.6.2"
|
||||
slug: kresuslocal
|
||||
description: Open source personal accounting management
|
||||
arch:
|
||||
- armhf
|
||||
- armv7
|
||||
- aarch64
|
||||
- amd64
|
||||
init: false
|
||||
options:
|
||||
postgres_hostname: homeassistant.local
|
||||
postgres_port: 5432
|
||||
postgres_user: kresus
|
||||
postgres_password: null
|
||||
postgres_database: kresus
|
||||
panel_icon: mdi:piggy-bank-outline
|
||||
ports:
|
||||
9876/tcp: 9876
|
||||
ports_description:
|
||||
9876/tcp: "The port to access kresus web server."
|
||||
schema:
|
||||
postgres_hostname: str
|
||||
postgres_port: int
|
||||
postgres_user: str
|
||||
postgres_password: password
|
||||
postgres_database: str
|
||||
http_basicauth: str?
|
||||
startup: system
|
||||
timeout: 20
|
||||
BIN
kresus-mrraph/icon.png
Normal file
BIN
kresus-mrraph/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
kresus-mrraph/logo.png
Normal file
BIN
kresus-mrraph/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
1
kresus-mrraph/requirements.txt
Normal file
1
kresus-mrraph/requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
python-jose
|
||||
56
kresus-mrraph/start.sh
Executable file
56
kresus-mrraph/start.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
bashio::log.info "Custom Start script"
|
||||
WOOB_DIR="/woob"
|
||||
KRESUS_INI_FILE="/etc/kresus/config.ini"
|
||||
|
||||
# ==============================================================================
|
||||
# Pull latest Woob version
|
||||
# ==============================================================================
|
||||
cd "${WOOB_DIR}" || bashio::exit.nok
|
||||
|
||||
#bashio::log.info "Clear woob install"
|
||||
#rm -rf {,.[!.],..?}*
|
||||
|
||||
#bashio::log.info "Add clean woob install"
|
||||
#wget -qO- https://gitlab.com/woob/woob/-/archive/master/woob-master.tar.gz | tar xz --strip-components=1
|
||||
|
||||
#bashio::log.info "Updating Woob dependencies..."
|
||||
#pip3 install --no-cache-dir --prefix .py-deps .
|
||||
PYTHONPATH=$(python3 -c "import sys, os; print(os.sep.join(['$(pwd)', '.py-deps', 'lib', f'python{sys.version_info.major}.{sys.version_info.minor}', 'site-packages']))")
|
||||
export PYTHONPATH
|
||||
bashio::log.info "Done updating Woob dependencies."
|
||||
|
||||
# ==============================================================================
|
||||
# Set-up environment variables
|
||||
# ==============================================================================
|
||||
|
||||
# Basic Kresus options
|
||||
export PORT=9876
|
||||
export HOST=0.0.0.0
|
||||
export KRESUS_PYTHON_EXEC=python3
|
||||
export KRESUS_WOOB_DIR="${WOOB_DIR}"
|
||||
|
||||
KRESUS_SALT="$(cat /data/kresus_salt)"
|
||||
export KRESUS_SALT
|
||||
|
||||
# Kresus Basic auth
|
||||
if bashio::config.has_value 'http_basicauth'; then
|
||||
KRESUS_AUTH="$(bashio::config 'http_basicauth')"
|
||||
export KRESUS_AUTH
|
||||
fi
|
||||
|
||||
# Kresus database
|
||||
export KRESUS_DB_TYPE="postgres"
|
||||
|
||||
KRESUS_DB_HOST="$(bashio::config 'postgres_hostname')"
|
||||
KRESUS_DB_PORT="$(bashio::config 'postgres_port')"
|
||||
KRESUS_DB_USERNAME="$(bashio::config 'postgres_user')"
|
||||
KRESUS_DB_PASSWORD="$(bashio::config 'postgres_password')"
|
||||
KRESUS_DB_NAME="$(bashio::config 'postgres_database')"
|
||||
export KRESUS_DB_HOST KRESUS_DB_PORT KRESUS_DB_USERNAME \
|
||||
KRESUS_DB_PASSWORD KRESUS_DB_NAME
|
||||
|
||||
# ==============================================================================
|
||||
# Start Kresus
|
||||
# ==============================================================================
|
||||
kresus -c ${KRESUS_INI_FILE}
|
||||
55
kresus-mrraph/start.sh.ori
Executable file
55
kresus-mrraph/start.sh.ori
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
WOOB_DIR="/woob"
|
||||
KRESUS_INI_FILE="/etc/kresus/config.ini"
|
||||
|
||||
# ==============================================================================
|
||||
# Pull latest Woob version
|
||||
# ==============================================================================
|
||||
cd "${WOOB_DIR}" || bashio::exit.nok
|
||||
|
||||
bashio::log.info "Clear woob install"
|
||||
rm -rf {,.[!.],..?}*
|
||||
|
||||
bashio::log.info "Add clean woob install"
|
||||
wget -qO- https://gitlab.com/woob/woob/-/archive/master/woob-master.tar.gz | tar xz --strip-components=1
|
||||
|
||||
bashio::log.info "Updating Woob dependencies..."
|
||||
pip3 install --no-cache-dir --prefix .py-deps .
|
||||
PYTHONPATH=$(python3 -c "import sys, os; print(os.sep.join(['$(pwd)', '.py-deps', 'lib', f'python{sys.version_info.major}.{sys.version_info.minor}', 'site-packages']))")
|
||||
export PYTHONPATH
|
||||
bashio::log.info "Done updating Woob dependencies."
|
||||
|
||||
# ==============================================================================
|
||||
# Set-up environment variables
|
||||
# ==============================================================================
|
||||
|
||||
# Basic Kresus options
|
||||
export PORT=9876
|
||||
export HOST=0.0.0.0
|
||||
export KRESUS_PYTHON_EXEC=python3
|
||||
export KRESUS_WOOB_DIR="${WOOB_DIR}"
|
||||
|
||||
KRESUS_SALT="$(cat /data/kresus_salt)"
|
||||
export KRESUS_SALT
|
||||
|
||||
# Kresus Basic auth
|
||||
if bashio::config.has_value 'http_basicauth'; then
|
||||
KRESUS_AUTH="$(bashio::config 'http_basicauth')"
|
||||
export KRESUS_AUTH
|
||||
fi
|
||||
|
||||
# Kresus database
|
||||
export KRESUS_DB_TYPE="postgres"
|
||||
|
||||
KRESUS_DB_HOST="$(bashio::config 'postgres_hostname')"
|
||||
KRESUS_DB_PORT="$(bashio::config 'postgres_port')"
|
||||
KRESUS_DB_USERNAME="$(bashio::config 'postgres_user')"
|
||||
KRESUS_DB_PASSWORD="$(bashio::config 'postgres_password')"
|
||||
KRESUS_DB_NAME="$(bashio::config 'postgres_database')"
|
||||
export KRESUS_DB_HOST KRESUS_DB_PORT KRESUS_DB_USERNAME \
|
||||
KRESUS_DB_PASSWORD KRESUS_DB_NAME
|
||||
|
||||
# ==============================================================================
|
||||
# Start Kresus
|
||||
# ==============================================================================
|
||||
kresus -c ${KRESUS_INI_FILE}
|
||||
27
kresus-mrraph/translations/en.yaml
Normal file
27
kresus-mrraph/translations/en.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
configuration:
|
||||
postgres_hostname:
|
||||
name: "DB hostname"
|
||||
description: >-
|
||||
Hostname of the PostgreSQL database.
|
||||
postgres_port:
|
||||
name: "DB port"
|
||||
description: >-
|
||||
Port of the PostgreSQL database.
|
||||
postgres_user:
|
||||
name: "DB user"
|
||||
description: >-
|
||||
User to connect to the database.
|
||||
postgres_password:
|
||||
name: "DB password"
|
||||
description: >-
|
||||
Password of the database user.
|
||||
postgres_database:
|
||||
name: "DB database"
|
||||
description: >-
|
||||
Name of the kresus database.
|
||||
http_basicauth:
|
||||
name: "Authentication"
|
||||
description: >-
|
||||
Logins for HTTP basic auth authentication ("login:passwd" format, optional).
|
||||
network:
|
||||
9876/tcp: Port to access kresus web server.
|
||||
Reference in New Issue
Block a user