Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Syntax check
- name: Type check
run: pnpm run check

- name: Build
run: pnpm run build

- name: Show help
run: node capture.mjs --help
run: node dist/capture.js --help
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# dependencies
node_modules/
.pnpm-store/
dist/

# captured screenshots (output)
*.png
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Requires **Node 18+** and **[pnpm](https://pnpm.io/)**.
git clone https://github.com/eda-labs/screenshotter.git
cd screenshotter
pnpm install
pnpm run build
```

You also need a **Chrome/Chromium** binary. The tool auto-detects a system
Expand All @@ -44,7 +45,8 @@ pnpm run install-browser # downloads a Chromium for playwright-core
From a local clone, register the command globally:

```bash
pnpm link --global
pnpm run build
pnpm add --global .
edascr capture --url https://my-eda.example.ts.net
```

Expand All @@ -70,9 +72,10 @@ edascr capture --url https://my-eda --aspect 16:9 \
--page /ui/app/main/interfaces.eda.nokia.com/v1alpha1/interfaces,/ui/app/main/core.eda.nokia.com/v1/toponodes
```

In a clone you can equivalently run `node capture.mjs ...`. Installed as a
package (`pnpm add -g @eda-labs/screenshotter`, or via `npx`/`pnpm dlx`), it
exposes `edascr` and `eda-screenshotter` commands.
In a clone you can equivalently run `pnpm capture --url ...`, which builds the
TypeScript source before running `node dist/capture.js`. Installed as a package
(`pnpm add -g @eda-labs/screenshotter`, or via `npx`/`pnpm dlx`), it exposes
`edascr` and `eda-screenshotter` commands.

The command prints per-phase timings while it runs. Authentication is performed
once per invocation and reused for each requested theme.
Expand Down Expand Up @@ -141,7 +144,7 @@ Two independent things control color:

- Tuned for the current EDA UI. In **collapsed** nav mode the rail icons have no
accessible labels, so Alarms / Transactions / Topologies are clicked by a
fixed pixel position (the `RAIL` y-coordinates near the top of `capture.mjs`).
fixed pixel position (the `RAIL` y-coordinates near the top of `src/capture.ts`).
If a future EDA release changes the rail, update those, or just use
`--nav expanded` (label-based, more robust). Very short viewports (height
below ~650) can push the lower rail icons off-screen in collapsed mode.
Expand Down
23 changes: 15 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
"description": "Capture themed (dark/light) screenshots of the Nokia EDA (Event Driven Automation) web UI.",
"type": "module",
"bin": {
"edascr": "./capture.mjs",
"eda-screenshotter": "./capture.mjs"
"edascr": "./dist/capture.js",
"eda-screenshotter": "./dist/capture.js"
},
"main": "capture.mjs",
"main": "dist/capture.js",
"types": "dist/capture.d.ts",
"files": [
"capture.mjs",
"dist",
"README.md",
"LICENSE"
],
"scripts": {
"capture": "node capture.mjs",
"start": "node capture.mjs",
"help": "node capture.mjs --help",
"check": "node --check capture.mjs",
"build": "tsc",
"capture": "pnpm run build && node dist/capture.js",
"start": "pnpm run capture",
"help": "pnpm run build && node dist/capture.js --help",
"check": "tsc --noEmit",
"prepare": "pnpm run build",
"install-browser": "playwright-core install chromium"
},
"keywords": [
Expand All @@ -44,5 +47,9 @@
"packageManager": "pnpm@11.3.0",
"dependencies": {
"playwright-core": "^1.60.0"
},
"devDependencies": {
"@types/node": "^26.0.0",
"typescript": "^6.0.3"
}
}
26 changes: 26 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading