Fixes for inline css (CSSOM)
This commit is contained in:
34
README.md
34
README.md
@@ -17,3 +17,37 @@ node src/cli.mjs archive ./page.html
|
||||
```
|
||||
|
||||
Archives are written to `ARCHIVE_PATH`, or to a development directory under the system temp directory when `ARCHIVE_PATH` is not set.
|
||||
|
||||
## Ephemeral container worker
|
||||
|
||||
The host-facing container boundary is `src/container-runner.mjs`. It starts a short-lived Docker/Podman worker container, mounts the host archive directory at `/archives`, sends one archive request, reads a JSON result, and exits.
|
||||
|
||||
Build the worker image:
|
||||
|
||||
```sh
|
||||
podman build -t local-page-archiver:latest .
|
||||
```
|
||||
|
||||
Archive through the worker on macOS with Podman:
|
||||
|
||||
```sh
|
||||
node src/container-runner.mjs archive "https://example.com/article" \
|
||||
--runtime podman \
|
||||
--image local-page-archiver:latest \
|
||||
--archive-path ./archives
|
||||
```
|
||||
|
||||
The convenience wrapper does the same thing and builds the image if missing:
|
||||
|
||||
```sh
|
||||
./podman-run.sh archive "https://example.com/article"
|
||||
```
|
||||
|
||||
For visual debugging, expose VNC from the worker:
|
||||
|
||||
```sh
|
||||
./podman-run.sh vnc-archive "https://example.com/article"
|
||||
# Then open vnc://localhost:5901
|
||||
```
|
||||
|
||||
The worker image starts Xvfb internally, so callers do not need to mount the host X11 socket or override the entrypoint.
|
||||
|
||||
Reference in New Issue
Block a user