1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-readtime
7 SDESC[v11]= Texing reading time calculator (3.11)
8 SDESC[v12]= Texing reading time calculator (3.12)
9 HOMEPAGE= https://github.com/alanhamlett/readtime
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPI/r/readtime
14 DISTFILE[1]= readtime-3.0.0.tar.gz:main
19 OPTIONS_AVAILABLE= PY311 PY312
20 OPTIONS_STANDARD= none
21 VOPTS[v11]= PY311=ON PY312=OFF
22 VOPTS[v12]= PY311=OFF PY312=ON
24 DISTNAME= readtime-3.0.0
28 [PY311].BUILDRUN_DEPENDS_ON= python-beautifulsoup4:single:v11
29 python-markdown2:single:v11
30 python-pyquery:single:v11
31 [PY311].USES_ON= python:v11,sutools
33 [PY312].BUILDRUN_DEPENDS_ON= python-beautifulsoup4:single:v12
34 python-markdown2:single:v12
35 python-pyquery:single:v12
36 [PY312].USES_ON= python:v12,sutools
38 [FILE:2023:descriptions/desc.single]
44 Calculates the time some text takes the average human to read, based on
45 Medium's [read time forumula].
49 Medium's Help Center says,
51 > Read time is based on the average reading speed of an adult (roughly 265
52 WPM). We take the total word count of a post and translate it into minutes,
53 with an adjustment made for images. For posts in Chinese, Japanese and
54 Korean, it's a function of number of characters (500 characters/min) with
55 an adjustment made for images.
57 Source: https://help.medium.com/hc/en-us/articles/214991667-Read-time (Read
60 Double checking with real articles, the English algorithm is:
62 seconds = num_words / 265 * 60 + img_weight * num_images
64 With `img_weight` starting at `12` and decreasing one second with each
65 image encountered, with a minium `img_weight` of `3` seconds.
73 Or if you like to live dangerously:
75 sudo pip install readtime
79 Import `readtime` and pass it some text, HTML, or Markdown to get back the
80 time it takes to read:
83 >>> result = readtime.of_text('The shortest blog post in the world!')
89 The result can also be used as a string:
91 >>> str(readtime.of_text('The shortest blog post in the world!'))
94 To calculate read time of Markdown:
96 >>> readtime.of_markdown('This is **Markdown**')
99 To calculate read time of HTML:
101 >>> readtime.of_html('This is <strong>HTML</strong>')
104 To customize the WPM (default 265):
106 >>> result = readtime.of_text('The shortest blog post in the world!',
117 Before contributing a pull request, make sure tests pass:
124 Many thanks to all [contributors]!
128 76c5a0d773ad49858c53b42ba3a942f62fbe20cc8c6f07875797ac7dc30963a9 6271 readtime-3.0.0.tar.gz