This commit is contained in:
David Allemang
2026-01-23 14:54:26 -05:00
parent ac78933b02
commit 134c2887c8
2 changed files with 7 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ The client depends on `imagemagick`, `scp`, and `xclip`. The host only needs to
apt install imagemagick ssh xclip apt install imagemagick ssh xclip
``` ```
Copy `imup` to your `~/.zfunc` or somewhere eles on your zsh `fpath`. Add the configuration to your `~/.zshrc`: Copy `imup` to your `~/.zfunc` or somewhere else on your zsh `fpath`. Add the configuration to your `~/.zshrc`:
``` ```
autoload -Uz imup autoload -Uz imup
@@ -57,6 +57,7 @@ For example, on my host `allemangd.dev` I have the following nginx static server
# nginx config # nginx config
server { server {
listen 80; listen 80;
# (ssl settings omitted)
server_name i.allemangd.dev; server_name i.allemangd.dev;
@@ -72,11 +73,11 @@ I've granted write permissions to `/var/www/i.allemangd.dev` to my ssh user, and
``` ```
# ssh config # ssh config
Host imup-host Host imup-host
HostName ... # only accessible via VPN HostName ...
User ... User ...
IdentifyFile ... IdentifyFile ...
``` ```
Then I set `IMUP_SCP_DIR="imup-host:/var/www/i.allemangd.dev` and `IMUP_URL=https://i.allemangd.dev` Then I set `IMUP_SCP_DIR="imup-host:/var/www/i.allemangd.dev` and `IMUP_URL=https://i.allemangd.dev` in my `~/.zshrc`.
The development environment in `mise.toml` uses the local directory `./images/` for both of these to avoid hosting requirements while testing. The development environment in `mise.toml` uses the local directory `./images/` for both of these to avoid hosting/authentication requirements while testing.

1
imup
View File

@@ -34,6 +34,7 @@ EOF
+) +)
xclip -o -selection clipboard -t image/png > "$file" || continue xclip -o -selection clipboard -t image/png > "$file" || continue
convert "$file" -strip "WEBP:$file" || continue convert "$file" -strip "WEBP:$file" || continue
echo "${IMUP_URL:?}/$name" | xclip -i -selection clipboard
src="<clipboard>" src="<clipboard>"
;; ;;
-) -)