rasterport 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# rasterport
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Capture web screenshots + DOM in one command. Built for AI agents, CI, and automation.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx rasterport https://example.com
|
|
@@ -45,3 +45,40 @@ The default output is JSON:
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
```
|
|
48
|
+
|
|
49
|
+
## Why rasterport?
|
|
50
|
+
|
|
51
|
+
- Single CLI command for screenshot + DOM capture
|
|
52
|
+
- JPEG screenshots by default to keep payloads smaller
|
|
53
|
+
- Returns screenshot and DOM together
|
|
54
|
+
- Designed for AI agents and automation workflows
|
|
55
|
+
- Works well in CI pipelines
|
|
56
|
+
|
|
57
|
+
## rasterport vs Puppeteer
|
|
58
|
+
|
|
59
|
+
| Feature | rasterport | Puppeteer |
|
|
60
|
+
|-----------------|------------|-----------|
|
|
61
|
+
| Setup | zero | heavy |
|
|
62
|
+
| Output size | small | large |
|
|
63
|
+
| API | simple | complex |
|
|
64
|
+
| Agent workflows | native | manual |
|
|
65
|
+
|
|
66
|
+
## For AI agents
|
|
67
|
+
|
|
68
|
+
rasterport exports the same `capture` function used by the CLI:
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
import { capture } from "rasterport";
|
|
72
|
+
|
|
73
|
+
await capture({
|
|
74
|
+
url: task.url,
|
|
75
|
+
fullPage: false,
|
|
76
|
+
width: 1280,
|
|
77
|
+
height: 800,
|
|
78
|
+
format: "base64",
|
|
79
|
+
imageFormat: "jpeg",
|
|
80
|
+
quality: 70,
|
|
81
|
+
screenshotOnly: true,
|
|
82
|
+
domOnly: false,
|
|
83
|
+
});
|
|
84
|
+
```
|