{ "info": { "author": "Alan Hamlett", "author_email": "alan.hamlett@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools" ], "description": "# readtime\n\n[![Tests](https://travis-ci.org/alanhamlett/readtime.svg?branch=master)](https://travis-ci.org/alanhamlett/readtime)\n[![Coverage](https://coveralls.io/repos/github/alanhamlett/readtime/badge.svg?branch=master)](https://coveralls.io/github/alanhamlett/readtime?branch=master)\n\nCalculates the time some text takes the average human to read, based on Medium's [read time forumula](https://help.medium.com/hc/en-us/articles/214991667-Read-time).\n\n\n### Algorithm\n\nMedium's Help Center says,\n\n> 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.\n\nSource: https://help.medium.com/hc/en-us/articles/214991667-Read-time (Read Sept 23rd, 2018)\n\nDouble checking with real articles, the English algorithm is:\n\n seconds = num_words / 265 * 60 + img_weight * num_images\n\nWith `img_weight` starting at `12` and decreasing one second with each image encountered, with a minium `img_weight` of `3` seconds.\n\n\n### Installation\n\n virtualenv venv\n . venv/bin/activate\n pip install readtime\n\nOr if you like to live dangerously:\n\n sudo pip install readtime\n\n\n### Usage\n\nImport `readtime` and pass it some text, HTML, or Markdown to get back the time it takes to read:\n\n >>> import readtime\n >>> result = readtime.of_text('The shortest blog post in the world!')\n >>> result.seconds\n 2\n >>> result.text\n u'1 min'\n\nThe result can also be used as a string:\n\n >>> str(readtime.of_text('The shortest blog post in the world!'))\n u'1 min read'\n\nTo calculate read time of Markdown:\n\n >>> readtime.of_markdown('This is **Markdown**')\n 1 min read\n\nTo calculate read time of HTML:\n\n >>> readtime.of_html('This is HTML')\n 1 min read\n\nTo customize the WPM (default 265):\n\n >>> result = readtime.of_text('The shortest blog post in the world!', wpm=5)\n >>> result.seconds\n 96\n >>> result.text\n u'2 min'\n >>> result.wpm\n 5\n\n\n### Contributing\n\nBefore contributing a pull request, make sure tests pass:\n\n virtualenv venv\n . venv/bin/activate\n pip install tox\n tox\n\nMany thanks to all [contributors](https://github.com/alanhamlett/readtime/blob/master/AUTHORS)!\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alanhamlett/readtime", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "readtime", "package_url": "https://pypi.org/project/readtime/", "platform": "any", "project_url": "https://pypi.org/project/readtime/", "project_urls": { "Homepage": "https://github.com/alanhamlett/readtime" }, "release_url": "https://pypi.org/project/readtime/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "Calculates the time some text takes the average human to read, based on Medium's read time forumula", "version": "1.1.1" }, "last_serial": 5086606, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "16917a11a9342526b0eb480552fe0914", "sha256": "8b646ac1c73b04ada6a9bb36b9b9de209aa8fa278b488f7a4977af331d698495" }, "downloads": -1, "filename": "readtime-1.0.0.tar.gz", "has_sig": false, "md5_digest": "16917a11a9342526b0eb480552fe0914", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4926, "upload_time": "2016-08-24T00:15:41", "url": "https://files.pythonhosted.org/packages/76/4f/245d7a507d5fa0c7aae5c1f5c07a0250b00f32c89838fae910c7d83087bf/readtime-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "319f4264a74b684e6b6f6d262cccb29e", "sha256": "7113938da84e46728ecbc506824c5f8fa9f15c3b975a025c2472205450492901" }, "downloads": -1, "filename": "readtime-1.0.1.tar.gz", "has_sig": false, "md5_digest": "319f4264a74b684e6b6f6d262cccb29e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4947, "upload_time": "2016-08-24T00:44:19", "url": "https://files.pythonhosted.org/packages/a0/d9/1bf5de4a3284b58270b8b602e7fe89620d680d127b14bca3cf4b145640c1/readtime-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "60cbf5e0253193d2ef5ba824027e2a9c", "sha256": "7ea44e3ae5caa189e1045dfc117148a030d90d0ee28c8c34381e9e553351a5cd" }, "downloads": -1, "filename": "readtime-1.0.2.tar.gz", "has_sig": false, "md5_digest": "60cbf5e0253193d2ef5ba824027e2a9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5000, "upload_time": "2016-08-24T13:21:15", "url": "https://files.pythonhosted.org/packages/e3/03/a734e686a899a8f20aaf0b551cc8719203ed768631fedf228e8a1b6937c6/readtime-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "2acf531ab6d22c4dcbb3a0e5725cbdbb", "sha256": "915244aaeb9e1b7115a7d3fa4dbe396a60f6663ffcde527eddec9861d541f567" }, "downloads": -1, "filename": "readtime-1.0.3.tar.gz", "has_sig": false, "md5_digest": "2acf531ab6d22c4dcbb3a0e5725cbdbb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5076, "upload_time": "2016-08-24T20:03:28", "url": "https://files.pythonhosted.org/packages/19/b5/1d96e2551ff89bcf5822918135a02a8c4068325fb8d19584243bb9dbdeea/readtime-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "53adbdae11091d0aed016002f17c621e", "sha256": "89e0e9dec8ce4d2364832d57bef2234b95db44e6d5b26e21fbeeaafa441f0ec2" }, "downloads": -1, "filename": "readtime-1.0.4.tar.gz", "has_sig": false, "md5_digest": "53adbdae11091d0aed016002f17c621e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5523, "upload_time": "2017-03-25T23:48:05", "url": "https://files.pythonhosted.org/packages/09/7b/49d5b63bfcf6bea311f577ca560c1fe18252b07dae690bb106b7456d40cb/readtime-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "2ed77df1f719cf3b2c0e876e31688f21", "sha256": "f32b1d7f32bed08383ca957f6a78f51802539757d0210406e748925b207927f0" }, "downloads": -1, "filename": "readtime-1.0.5.tar.gz", "has_sig": false, "md5_digest": "2ed77df1f719cf3b2c0e876e31688f21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5546, "upload_time": "2017-03-25T23:55:59", "url": "https://files.pythonhosted.org/packages/af/ab/423766d34f118e8bdfa2f3f27d67b265631054b6ac3f7366cff91c3f440e/readtime-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "bc5858b91fe445891719ef50d5e40347", "sha256": "4882464c7a36bc0b0b8d0ebad6d8891e00eb8ef991847f824b0e086d86daf7d5" }, "downloads": -1, "filename": "readtime-1.0.6.tar.gz", "has_sig": false, "md5_digest": "bc5858b91fe445891719ef50d5e40347", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5576, "upload_time": "2018-05-02T02:39:39", "url": "https://files.pythonhosted.org/packages/cd/20/489e58a9ece8e5a69b5028c719ba5f4cb800ed4ce642b56261720ccd7afb/readtime-1.0.6.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "8dadc1aea69ff6a6d7ed0dd03390f8e6", "sha256": "a2a8ea77c7480f7b279494b71484ce0d6ab301b06b20e17e8edb7d930787c380" }, "downloads": -1, "filename": "readtime-1.1.0.tar.gz", "has_sig": false, "md5_digest": "8dadc1aea69ff6a6d7ed0dd03390f8e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6078, "upload_time": "2019-02-13T06:17:18", "url": "https://files.pythonhosted.org/packages/36/bc/563243f52a700a08db2cfc1f4b24aa74a4723799ad56a69fb0be5f3b61cf/readtime-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "e2e1e6ce5f6beb8689872175917ca344", "sha256": "a9c7942bd2660cb1ef2822ecee8b5f3d1bf1fcb474b0b935b1152b92c33b983a" }, "downloads": -1, "filename": "readtime-1.1.1.tar.gz", "has_sig": false, "md5_digest": "e2e1e6ce5f6beb8689872175917ca344", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6089, "upload_time": "2019-04-03T07:31:43", "url": "https://files.pythonhosted.org/packages/d5/d9/2a9c9c7c0bc848d4a03a49fc8807c09453b34fd250d8c39e1dd84fa644b4/readtime-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e2e1e6ce5f6beb8689872175917ca344", "sha256": "a9c7942bd2660cb1ef2822ecee8b5f3d1bf1fcb474b0b935b1152b92c33b983a" }, "downloads": -1, "filename": "readtime-1.1.1.tar.gz", "has_sig": false, "md5_digest": "e2e1e6ce5f6beb8689872175917ca344", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6089, "upload_time": "2019-04-03T07:31:43", "url": "https://files.pythonhosted.org/packages/d5/d9/2a9c9c7c0bc848d4a03a49fc8807c09453b34fd250d8c39e1dd84fa644b4/readtime-1.1.1.tar.gz" } ] }