{"id":32168321,"url":"https://github.com/nikkos/retim","last_synced_at":"2026-02-19T07:02:48.712Z","repository":{"id":57543610,"uuid":"85334201","full_name":"nikkos/retim","owner":"nikkos","description":"Estimate Reading Time","archived":false,"fork":false,"pushed_at":"2018-05-08T00:40:10.000Z","size":304,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T15:51:36.366Z","etag":null,"topics":["elixir","estimate","minutes","phoenix","readingtime","text","words"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikkos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-17T16:44:54.000Z","updated_at":"2018-05-08T00:40:11.000Z","dependencies_parsed_at":"2022-08-27T19:10:21.889Z","dependency_job_id":null,"html_url":"https://github.com/nikkos/retim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nikkos/retim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikkos%2Fretim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikkos%2Fretim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikkos%2Fretim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikkos%2Fretim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikkos","download_url":"https://codeload.github.com/nikkos/retim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikkos%2Fretim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29605803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","estimate","minutes","phoenix","readingtime","text","words"],"created_at":"2025-10-21T15:51:20.152Z","updated_at":"2026-02-19T07:02:48.691Z","avatar_url":"https://github.com/nikkos.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Retim\n\n[![Build Status](https://travis-ci.org/nikkos/retim.svg?branch=master)](https://travis-ci.org/nikkos/retim)\n\nEstimate the reading time of a text or a text file\n\n## Installation\n\nYou can donwload retim or you can install it as package, to use it in your projects.\nYou can found it at [Hex](https://hex.pm/packages/retim).\nAlso you can add `retim` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:retim, \"~\u003e 0.2.3\"}]\nend\n```\n## Supported languages:\n- English:    \"en\"\n- Greek:      \"gr\"\n- Italian:    \"it\"\n- Spanish:    \"es\"\n- Norwegian:  \"no\"\n- German:     \"ge\"\n- Russian:    \"ru\"\n- Portuguese: \"pt\"\n\n## How to use it\n\nEstimate the reading time of a setence:\n```elixir\niex\u003e Retim.count(\"Hello World\")\n\"1 minute\"\n```\nYou can change the default language:\n```elixir\niex\u003e Retim.count(\"Hello World\", \"it\")\n\"1 minuto\"\n```\n\nThe average reading time per minute is 180 words. If you want to change it you can pass a second argument:\n```elixir\niex\u003e Retim.count(\"Hello World\", \"en\", 120)\n\"1 minute\"\n```\n\nIf you want to change only the reading time, you need to choose the language or leave the second argument blank:\n```elixir\niex\u003e Retim.count(\"Hello World\", \"\", 150)\n```\n\nRead words from a  file:\n```elixir\niex\u003e Retim.count_file(\"hello.md\")\n\"4 minutes\"\n```\n\nRead a file and change the average reading time to 120 words / per minute:\n```elixir\niex\u003e Retim.count_file(\"hello.md\", \"en\", 120)\n\"7 minutes\"\n```\n\n## Use Retim in Phoenix\nAdd retim on your dependencies:\n```elixir\n defp deps do\n    [{:phoenix, \"~\u003e 1.2.1\"},\n      ........\n      ........\n     {:cowboy, \"~\u003e 1.0\"},\n     {:retim, \"~\u003e 0.2.3\"}]\n  end\n  ```\n  Run deps.get on your terminal:\n  ```elixir\n  mix deps.get\n  ```\n  ### Example\n\n  Generate a post:\n  ```elixir\n  mix phoenix.gen.html Post posts title:string body:text\n  ```\n\n  To count the reading time of the body text, add count(@post.body) on your templates(post/show.html.eex):\n  ```elixir\n  \u003c%= Retim.count(@post.body) %\u003e\n  ```\n  ### Result\n  ![alt tag](https://github.com/nikkos/retim/blob/master/example1.png)\n\n  To change the language add:\n  ```elixir\n  \u003c%= Retim.count(@post.body, \"es\") %\u003e\n  ```\n  ### Result (with spanish)\n  ![alt tag](https://github.com/nikkos/retim/blob/master/example2.png)\n\n\n### To-do\n- [x] Add other languages\n- [ ] Add new print format (Example: 3 minutes and 10 seconds)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikkos%2Fretim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikkos%2Fretim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikkos%2Fretim/lists"}