aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2023-09-03 08:02:44 +0000
committerKai Knoblich <kai@FreeBSD.org>2023-09-03 08:02:44 +0000
commitc27811bf4ead028fbe0ab0ab931c5906564d81c8 (patch)
treeecb101762a64939e28db76dcace8b625b910383f
parentf58017fbbf3f23ae9073f0202fb3758ec5d0f0a5 (diff)
downloadports-c27811bf4ead028fbe0ab0ab931c5906564d81c8.tar.gz
ports-c27811bf4ead028fbe0ab0ab931c5906564d81c8.zip
textproc/py-readtime: New port
Calculates the time some text takes the average human to read, based on Medium's read time forumula. Medium's Help Center says: "Read time is based on the average reading speed of an adult (roughly 265 WPM). We take the total word count of a post and translate it into minutes, with an adjustment made for images. For posts in Chinese, Japanese and Korean, it's a function of number of characters (500 characters/min) with an adjustment made for images." Source: https://help.medium.com/hc/en-us/articles/214991667-Read-time
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/py-readtime/Makefile23
-rw-r--r--textproc/py-readtime/distinfo3
-rw-r--r--textproc/py-readtime/pkg-descr12
4 files changed, 39 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index 3bd507ddd7f5..880ac8115144 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1525,6 +1525,7 @@
SUBDIR += py-qrcode
SUBDIR += py-rdflib
SUBDIR += py-readchar
+ SUBDIR += py-readtime
SUBDIR += py-recommonmark
SUBDIR += py-regex
SUBDIR += py-reindent
diff --git a/textproc/py-readtime/Makefile b/textproc/py-readtime/Makefile
new file mode 100644
index 000000000000..2ba5d0b2b3b2
--- /dev/null
+++ b/textproc/py-readtime/Makefile
@@ -0,0 +1,23 @@
+PORTNAME= readtime
+DISTVERSION= 3.0.0
+CATEGORIES= textproc python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= kai@FreeBSD.org
+COMMENT= Calculates the time some text takes the average human to read
+WWW= https://github.com/alanhamlett/readtime
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=4.0.1:www/py-beautifulsoup@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}markdown2>=2.4.3:textproc/py-markdown2@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pyquery>=1.2:devel/py-pyquery@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist distutils
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/textproc/py-readtime/distinfo b/textproc/py-readtime/distinfo
new file mode 100644
index 000000000000..52a897adfe40
--- /dev/null
+++ b/textproc/py-readtime/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1693484825
+SHA256 (readtime-3.0.0.tar.gz) = 76c5a0d773ad49858c53b42ba3a942f62fbe20cc8c6f07875797ac7dc30963a9
+SIZE (readtime-3.0.0.tar.gz) = 6271
diff --git a/textproc/py-readtime/pkg-descr b/textproc/py-readtime/pkg-descr
new file mode 100644
index 000000000000..b6946a6fd286
--- /dev/null
+++ b/textproc/py-readtime/pkg-descr
@@ -0,0 +1,12 @@
+Calculates the time some text takes the average human to read, based on
+Medium's read time forumula.
+
+Medium's Help Center says:
+
+"Read time is based on the average reading speed of an adult (roughly 265 WPM).
+ We take the total word count of a post and translate it into minutes, with an
+ adjustment made for images. For posts in Chinese, Japanese and Korean, it's a
+ function of number of characters (500 characters/min) with an adjustment made
+ for images."
+
+Source: https://help.medium.com/hc/en-us/articles/214991667-Read-time