diff --git a/README.md b/README.md index 0d5f943..6718ab3 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The client depends on `imagemagick`, `scp`, and `xclip`. The host only needs to 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 @@ -56,7 +56,8 @@ For example, on my host `allemangd.dev` I have the following nginx static server ``` # nginx config server { - listen 80; + listen 80; + # (ssl settings omitted) 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 Host imup-host - HostName ... # only accessible via VPN + HostName ... User ... 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. diff --git a/imup b/imup index 999d5fe..31f4a51 100755 --- a/imup +++ b/imup @@ -34,6 +34,7 @@ EOF +) xclip -o -selection clipboard -t image/png > "$file" || continue convert "$file" -strip "WEBP:$file" || continue + echo "${IMUP_URL:?}/$name" | xclip -i -selection clipboard src="" ;; -)