git: e7a4e6ee8827 - main - graphics/py-nokap: New port: Capture screenshots and PDFs from web pages with headless Chrome
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Sep 2026 00:42:18 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e7a4e6ee8827cfba49b0e18b25157e2931bcef46
commit e7a4e6ee8827cfba49b0e18b25157e2931bcef46
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-07 18:18:27 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-08 00:38:58 +0000
graphics/py-nokap: New port: Capture screenshots and PDFs from web pages with headless Chrome
PR: 298268
Approved by: Baptiste Daroussin <bapt@FreeBSD.org> (on behalf of portmgr@)
---
graphics/Makefile | 1 +
graphics/py-nokap/Makefile | 33 +++++++++++++++++++++++++++++++++
graphics/py-nokap/distinfo | 3 +++
graphics/py-nokap/pkg-descr | 2 ++
4 files changed, 39 insertions(+)
diff --git a/graphics/Makefile b/graphics/Makefile
index 472c835248cf..a0de2ba33c20 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -989,6 +989,7 @@
SUBDIR += py-napari-console
SUBDIR += py-napari-plugin-engine
SUBDIR += py-neatnet
+ SUBDIR += py-nokap
SUBDIR += py-nwdiag
SUBDIR += py-olmocr
SUBDIR += py-opencolorio
diff --git a/graphics/py-nokap/Makefile b/graphics/py-nokap/Makefile
new file mode 100644
index 000000000000..341e29c8cd96
--- /dev/null
+++ b/graphics/py-nokap/Makefile
@@ -0,0 +1,33 @@
+PORTNAME= nokap
+PORTVERSION= 0.1.0
+CATEGORIES= graphics python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Capture screenshots and PDFs from web pages with headless Chrome
+WWW= https://github.com/posit-dev/nokap
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=45:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=6.2:devel/py-setuptools-scm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>=8.0:devel/py-click@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}websockets>=12.0:devel/py-websockets@${PY_FLAVOR} \
+ chrome:www/chromium
+
+USES= python
+USE_PYTHON= autoplist pep517 pytest
+
+TEST_ARGS= -k "not test_find_chrome_env_var"
+
+NO_ARCH= yes
+
+post-patch:
+ @${REINPLACE_CMD} -i '' -e 's|os.environ.get("CHROME_PATH")|"${LOCALBASE}/bin/chrome"|' ${WRKSRC}/nokap/_browser.py
+
+# tests as of 0.1.0: 102 passed 2 deselected
+
+.include <bsd.port.mk>
diff --git a/graphics/py-nokap/distinfo b/graphics/py-nokap/distinfo
new file mode 100644
index 000000000000..2b6180159758
--- /dev/null
+++ b/graphics/py-nokap/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1788771858
+SHA256 (nokap-0.1.0.tar.gz) = 63071cf5e7c4f0487532f6281c6ea85d90673d5cd835ffe5e64c913989742eb9
+SIZE (nokap-0.1.0.tar.gz) = 77047
diff --git a/graphics/py-nokap/pkg-descr b/graphics/py-nokap/pkg-descr
new file mode 100644
index 000000000000..716ca54d8132
--- /dev/null
+++ b/graphics/py-nokap/pkg-descr
@@ -0,0 +1,2 @@
+nokap captures screenshots and PDFs from web pages by driving headless Chrome
+through the Chrome DevTools Protocol (CDP).