Skip to content

armgit / iris

Public Imported from GitHub
0

Screenshots of live websites. Minimal interface, powerful engine.

Rename to shot; build both Mac targets on macos-latest

Bridger Tower24562ecfb5d1
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 45250ab..65b3f73 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -15,7 +15,7 @@ jobs:
- target: aarch64-apple-darwin
runner: macos-latest
- target: x86_64-apple-darwin
- runner: macos-13
+ runner: macos-latest
- target: x86_64-unknown-linux-musl
runner: ubuntu-latest
runs-on: ${{ matrix.runner }}
@@ -27,11 +27,11 @@ jobs:
- if: contains(matrix.target, 'musl')
run: sudo apt-get update && sudo apt-get install -y musl-tools
- run: cargo build --release --target ${{ matrix.target }}
- - run: tar -C target/${{ matrix.target }}/release -czf snap-${{ matrix.target }}.tar.gz snap
+ - run: tar -C target/${{ matrix.target }}/release -czf shot-${{ matrix.target }}.tar.gz shot
- uses: actions/upload-artifact@v4
with:
- name: snap-${{ matrix.target }}
- path: snap-${{ matrix.target }}.tar.gz
+ name: shot-${{ matrix.target }}
+ path: shot-${{ matrix.target }}.tar.gz
release:
needs: build
@@ -42,5 +42,5 @@ jobs:
merge-multiple: true
- uses: softprops/action-gh-release@v2
with:
- files: snap-*.tar.gz
+ files: shot-*.tar.gz
generate_release_notes: true
diff --git a/Cargo.lock b/Cargo.lock
index 861a51a..cfcf00f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -961,6 +961,19 @@ dependencies = [
"digest",
]
+[[package]]
+name = "shot"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "chromiumoxide",
+ "clap",
+ "futures",
+ "serde_json",
+ "tokio",
+ "url",
+]
+
[[package]]
name = "signal-hook-registry"
version = "1.4.8"
@@ -983,19 +996,6 @@ version = "1.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
-[[package]]
-name = "snap"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "chromiumoxide",
- "clap",
- "futures",
- "serde_json",
- "tokio",
- "url",
-]
-
[[package]]
name = "socket2"
version = "0.6.5"
diff --git a/Cargo.toml b/Cargo.toml
index 0d75218..cdce9f9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,11 +1,11 @@
[package]
-name = "snap"
+name = "shot"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
description = "Minimal, powerful screenshots of live websites"
license = "MIT"
-repository = "https://github.com/brijr/snap"
+repository = "https://github.com/brijr/shot"
readme = "README.md"
keywords = ["screenshot", "cli", "chrome", "headless", "web"]
categories = ["command-line-utilities"]
diff --git a/README.md b/README.md
index 530fad2..61abe18 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,26 @@
-# snap
+# shot
Screenshots of live websites. Minimal interface, powerful engine.
```
-snap example.com # 1440×900 @2x → example.com.png
-snap --full --dark tailwindcss.com # full page, dark color scheme
-snap --size iphone stripe.com # 390×844 @3x with a mobile UA
-snap -o shots/ a.com b.com c.com # batch, captured concurrently
-cat urls.txt | snap - -o shots/ # batch from stdin (# comments ok)
-snap -o hero.jpg --wait-for 'h1' app.dev
+shot example.com # 1440×900 @2x → example.com.png
+shot --full --dark tailwindcss.com # full page, dark color scheme
+shot --size iphone stripe.com # 390×844 @3x with a mobile UA
+shot -o shots/ a.com b.com c.com # batch, captured concurrently
+cat urls.txt | shot - -o shots/ # batch from stdin (# comments ok)
+shot -o hero.jpg --wait-for 'h1' app.dev
```
## Install
```
-curl -fsSL https://raw.githubusercontent.com/brijr/snap/main/install.sh | sh
+curl -fsSL https://raw.githubusercontent.com/brijr/shot/main/install.sh | sh
```
Or with a Rust toolchain:
```
-cargo install --git https://github.com/brijr/snap
+cargo install --git https://github.com/brijr/shot
```
The only runtime dependency is an installed Chrome-family browser (Chrome, Chromium, Edge, or Brave).
diff --git a/install.sh b/install.sh
index 0371a55..894dc96 100644
--- a/install.sh
+++ b/install.sh
@@ -1,10 +1,10 @@
#!/bin/sh
-# snap installer — https://github.com/brijr/snap
-# usage: curl -fsSL https://raw.githubusercontent.com/brijr/snap/main/install.sh | sh
+# shot installer — https://github.com/brijr/shot
+# usage: curl -fsSL https://raw.githubusercontent.com/brijr/shot/main/install.sh | sh
set -eu
-REPO="brijr/snap"
-DIR="${SNAP_INSTALL_DIR:-$HOME/.local/bin}"
+REPO="brijr/shot"
+DIR="${SHOT_INSTALL_DIR:-$HOME/.local/bin}"
case "$(uname -s)-$(uname -m)" in
Darwin-arm64) TARGET="aarch64-apple-darwin" ;;
@@ -17,12 +17,12 @@ case "$(uname -s)-$(uname -m)" in
;;
esac
-URL="https://github.com/$REPO/releases/latest/download/snap-$TARGET.tar.gz"
-echo "downloading snap ($TARGET)…"
+URL="https://github.com/$REPO/releases/latest/download/shot-$TARGET.tar.gz"
+echo "downloading shot ($TARGET)…"
mkdir -p "$DIR"
curl -fsSL "$URL" | tar -xz -C "$DIR"
-chmod +x "$DIR/snap"
-echo "installed $("$DIR/snap" --version) → $DIR/snap"
+chmod +x "$DIR/shot"
+echo "installed $("$DIR/shot" --version) → $DIR/shot"
case ":$PATH:" in
*":$DIR:"*) ;;
diff --git a/src/main.rs b/src/main.rs
index ac7357b..7da4a48 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,14 +16,14 @@ use url::Url;
/// smart waiting, lazy-load handling, retina output, concurrent capture.
#[derive(Parser)]
#[command(
- name = "snap",
+ name = "shot",
version,
arg_required_else_help = true,
after_help = "\
Examples:
- snap example.com 1440\u{d7}900 @2x \u{2192} example.com.png
- snap --full --dark tailwindcss.com full page, dark color scheme
- cat urls.txt | snap - -o shots/ concurrent batch from stdin"
+ shot example.com 1440\u{d7}900 @2x \u{2192} example.com.png
+ shot --full --dark tailwindcss.com full page, dark color scheme
+ cat urls.txt | shot - -o shots/ concurrent batch from stdin"
)]
struct Cli {
/// URLs to capture; `-` reads newline-separated URLs from stdin