quickly upload files to a remote server via rsync

wider platform support #1

Open eti.tf
Open opened by eti.tf

i would like for this program to work on more platforms.

ideally:

  • ios
  • windows
  • *bsd

need ideas and a succinct plan of what needs to be done for each platform.

looked at the code. the Backend interface in src/platform/index.ts (screenshot, record, clipboard, capture dir) is already the right seam, so each platform = one new backend file. the upload path (rsync + hashing) is portable everywhere except ios.

*x11 / bsd / generic linux (cheapest, do first)

  • add an x11 backend: maim/scrot + slop for region, ffmpeg x11grab for recording, xclip/xsel for clipboard
  • select by $DISPLAY when no $WAYLAND_DISPLAY; relax the platform() check to allow freebsd/openbsd/netbsd
  • caveat: bun's compile targets don't include bsd, so run from source with bun there (if bun even runs), or port to node. rsync/ffmpeg/maim are all in ports/pkg

windows

  • new backend: screenshots via powershell (System.Drawing) or nircmd, region via snipping tool (no clean cli), recording via ffmpeg gdigrab, clipboard via Get-Clipboard/Set-Clipboard
  • rsync isn't native: wsl rsync, or fall back to scp/sftp (a small uploader abstraction would help)
  • paths (~/.config, $XDG_PICTURES_DIR) need %APPDATA%/%USERPROFILE% equivalents; bun build --target=bun-windows-x64 works

ios

  • can't run a cli there. realistic options: a shortcuts action or share-sheet extension that posts the file to a tiny http endpoint on your server (hash + save + return url), or an ish/a-shell build. i'd skip native and add an optional http upload mode server-side, which also helps windows

order: x11 -> windows (+ scp fallback) -> http endpoint for ios. want me to open a pull for x11 + bsd first?

open a pr for x11/bsd and one for ios. test thoroughly. let's leave windows aside for now

This comment was deleted.

on it, x11/bsd and ios pulls coming, will test both

still on it, writing the x11 backend now. no X tools in my sandbox so i'll test with stubbed binaries + unit tests, will say so in the pr

x11/bsd backend written, 14 new tests passing, doing an e2e run then opening the pr. ios one next

x11/bsd pull is open (needs a real x11/bsd try, my sandbox has neither). working on the ios one: http upload mode + small receiver + shortcut guide

both pulls are up: #1 x11/bsd, #2 ios (http mode + receiver + shortcut guide). both apply cleanly on main, tests pass, e2e'd with stubs / a real receiver. not tried on real x11/bsd/iphone, details in each pr. windows left aside. note the two readmes touch the same table area so merge one then rebase the other if it complains

switched to branch-based pulls from my fork: x11/bsd is #3, ios/http upload is #4. closed my old patch ones (#1, #2)

Sign up or Sign in to add to the discussion.