From 97ae8a07b4c5e064f7bb8aa0163c0e35876f0105 Mon Sep 17 00:00:00 2001 From: Martyn Date: Sun, 22 Jun 2025 22:58:59 +0200 Subject: [PATCH] Working and ready(ish) for public(ish) consumption) --- .ko.yaml | 0 README.md | 2 ++ build.sh | 3 +++ main.go | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .ko.yaml diff --git a/.ko.yaml b/.ko.yaml new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index e69de29..d21d48d 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,2 @@ +to build without the frames from bad apple : +KO_DATA_PATH=/somenonexistantpath ko build . diff --git a/build.sh b/build.sh index 8d660be..a5af53e 100644 --- a/build.sh +++ b/build.sh @@ -1,3 +1,6 @@ #!/bin/sh export KO_DOCKER_REPO=git.martyn.berlin/martyn/apples +export KO_DATA_PATH=kodata/ + +ko build . diff --git a/main.go b/main.go index 899db75..a4c04e8 100644 --- a/main.go +++ b/main.go @@ -354,7 +354,7 @@ func parseSize(c echo.Context, maxWidth int, maxHeight int) tagSize { func main() { var ( - dataDir = flag.String("data-dir", filepath.Join(".", "kodata", "frames"), "Data directory, where the images are") + dataDir = flag.String("data-dir", filepath.Join("/", "var", "run", "ko", "frames"), "Data directory, where the images are") outDir = flag.String("output-dir", filepath.Join(".", "output"), "Output directory (used as cache) for resized files - set to `%TEMP%` to disable caching and use temp dir, default is DataDir/output") bwBack = flag.Bool("black-white-back", true, "Fill background with black or white (whichever is closest) - good for eInk, if false, uses top-left pixel of image's colour") listenPort = flag.Int("listen-port", 8080, "Port to listen on")