From 89af7d175833cbec985395633b20ef555f134c06 Mon Sep 17 00:00:00 2001 From: Igor Ovsyannikov Date: Tue, 9 Sep 2025 00:03:27 +0300 Subject: [PATCH] feat: improve readme, prepare to publish repo --- README.md | 61 +++++++++++++++++++++++++++++++++++++ main.py => lohup-cli.py | 2 -- main.spec => lohup-cli.spec | 4 +-- pyproject.toml | 18 ++++++++++- 4 files changed, 80 insertions(+), 5 deletions(-) rename main.py => lohup-cli.py (96%) rename main.spec => lohup-cli.spec (93%) diff --git a/README.md b/README.md index e69de29..a1cabbf 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,61 @@ +# Lohup + +(_loh-up - backup for lohs[1]_) + +Lohup - backups done dummy. + +## Development status + +Early alpha. Works on my machines. + +## Installation + +[Restic](https://restic.net) and [uv](https://docs.astral.sh/uv/) for Python required. Or just Python 3.13 and restic. + +```bash +apt update && apt install -y restic +uv tool install git+https://github.com/kam1sh/lohup +``` + +## Usage + +Example configuration see in [corresponding directory](examples/complete.toml) + +CLI examples: + +```bash +lohup --config config.toml restic --repo cloud -- init +# if config=lohup.toml then option can be omitted +lohup backup-all +lohup snapshots --repo cloud +``` + +## Core features + +* Configuration in TOML +* Restic as a backup driver +* Backup hooks, such as create/remove btrfs filesystem snapshot +* Environment variables + +### Features in TODO + +* LVM hooks +* Better error handling and printing +* Verbose/debug messages +* Metrics and OpenTelemetry support +* Binary releases, win+linux amd64 along with Python wheel +* Include files in profiles with `paths-from` + +## Development + +```bash +git clone git@github.com:kam1sh/lohup lohup-dev && cd lohup-dev +# install dependencies +uv sync --group dev +# run tests +uv run pytest --tb=short +# building binaries to dist directory +uv run pyinstaller -F lohup-cli.spec +``` + +[1] in my native language loh (лох) means "dummy" or "looser" diff --git a/main.py b/lohup-cli.py similarity index 96% rename from main.py rename to lohup-cli.py index fd18e75..b531498 100644 --- a/main.py +++ b/lohup-cli.py @@ -2,5 +2,3 @@ from lohup.cli import cli cli() - - diff --git a/main.spec b/lohup-cli.spec similarity index 93% rename from main.spec rename to lohup-cli.spec index 2ba8dd9..9902ac6 100644 --- a/main.spec +++ b/lohup-cli.spec @@ -2,7 +2,7 @@ a = Analysis( - ['main.py'], + ['lohup-cli.py'], pathex=[], binaries=[], datas=[], @@ -22,7 +22,7 @@ exe = EXE( a.binaries, a.datas, [], - name='main', + name='lohup', debug=False, bootloader_ignore_signals=False, strip=False, diff --git a/pyproject.toml b/pyproject.toml index 211cc0c..089d03c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,30 @@ [project] name = "lohup" version = "0.1.0" -description = "Add your description here" +description = "Backups done dummy" readme = "README.md" +maintainers = [ + {name = "Igor Ovsyannikov"} +] +license = "MIT" +keywords = ["restic", "backups"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Operating System :: POSIX :: Linux", + "Intended Audience :: System Administrators", + "Topic :: System :: Archiving :: Backup", + "Topic :: Utilities", +] requires-python = ">=3.13" dependencies = [ "click>=8.2.1", "humanize>=4.13.0", ] +[project.urls] +Repository = "https://github.com/kam1sh/lohup" + [dependency-groups] dev = [ "pyinstaller>=6.15.0",