aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cottlehuber <dch@FreeBSD.org>2024-05-22 13:57:17 +0000
committerDave Cottlehuber <dch@FreeBSD.org>2024-05-22 13:57:17 +0000
commitf0fec65dc7c2a7f8264f412b2752635ad625eadd (patch)
tree6851019d53d42ff233ab55d8bc7246407f4d161a
parent6ed889c845902e8eeabdaa629e2704b9704f6edd (diff)
downloadports-f0fec65dc7c2a7f8264f412b2752635ad625eadd.tar.gz
ports-f0fec65dc7c2a7f8264f412b2752635ad625eadd.zip
misc/py-files-to-prompt: new port - concatenate files for LLM prompts
-rw-r--r--misc/Makefile1
-rw-r--r--misc/py-files-to-prompt/Makefile31
-rw-r--r--misc/py-files-to-prompt/distinfo3
-rw-r--r--misc/py-files-to-prompt/pkg-descr4
4 files changed, 39 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index c87a02a2b6f2..d127008332ac 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -423,6 +423,7 @@
SUBDIR += py-facenet-pytorch
SUBDIR += py-fast-histogram
SUBDIR += py-fastscapelib
+ SUBDIR += py-files-to-prompt
SUBDIR += py-fleep
SUBDIR += py-fuzzy
SUBDIR += py-gluoncv
diff --git a/misc/py-files-to-prompt/Makefile b/misc/py-files-to-prompt/Makefile
new file mode 100644
index 000000000000..a453d49adef7
--- /dev/null
+++ b/misc/py-files-to-prompt/Makefile
@@ -0,0 +1,31 @@
+PORTNAME= files-to-prompt
+DISTVERSION= 0.2.1
+CATEGORIES= misc python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= dch@FreeBSD.org
+COMMENT= Python CLI utility to concatenate files into a single LLM prompt
+WWW= https://github.com/simonw/files-to-prompt
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=41:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517
+
+NO_ARCH= yes
+PORTDOCS= README.md
+
+OPTIONS_DEFINE= DOCS
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} \
+ ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/misc/py-files-to-prompt/distinfo b/misc/py-files-to-prompt/distinfo
new file mode 100644
index 000000000000..51f49ea15207
--- /dev/null
+++ b/misc/py-files-to-prompt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1716206253
+SHA256 (files-to-prompt-0.2.1.tar.gz) = a544a4ecbcf02c1ae562a22b9f9901b755860e651879c36c093fe549a6c503c4
+SIZE (files-to-prompt-0.2.1.tar.gz) = 8278
diff --git a/misc/py-files-to-prompt/pkg-descr b/misc/py-files-to-prompt/pkg-descr
new file mode 100644
index 000000000000..ec18cadbb1b6
--- /dev/null
+++ b/misc/py-files-to-prompt/pkg-descr
@@ -0,0 +1,4 @@
+Concatenate a directory full of files into a single prompt for use with Large
+Language Models. For background on this project see:
+
+ https://simonwillison.net/2024/Apr/8/files-to-prompt