{"id":17855885,"url":"https://github.com/splorp/haircut","last_synced_at":"2025-04-02T18:16:37.013Z","repository":{"id":137594347,"uuid":"271642112","full_name":"splorp/haircut","owner":"splorp","description":"Cut the hairs! Post the stats!","archived":false,"fork":false,"pushed_at":"2024-12-18T17:15:06.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T08:47:16.659Z","etag":null,"topics":["grooming","haircut","statistics","stats"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/splorp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-11T20:37:22.000Z","updated_at":"2024-12-18T17:15:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"77f97c7f-a798-43a6-9f9c-74e375fb56d1","html_url":"https://github.com/splorp/haircut","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splorp%2Fhaircut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splorp%2Fhaircut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splorp%2Fhaircut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splorp%2Fhaircut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splorp","download_url":"https://codeload.github.com/splorp/haircut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866100,"owners_count":20846496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["grooming","haircut","statistics","stats"],"created_at":"2024-10-28T02:42:19.482Z","updated_at":"2025-04-02T18:16:36.995Z","avatar_url":"https://github.com/splorp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haircut\n\nThis Python script calculates basic statistics pulled from [my haircut page](https://splorp.com/about/haircut/).\n\nBased on the original [Gist](https://gist.github.com/kylefox/654113) created by [Kyle Fox](https://github.com/kylefox/).\n\n## Sample Output\n\n```\nNumber of haircuts recorded: 140 (Since October 10, 1998)\nShortest time between haircuts: 9 days (July 21, 2016 to July 30, 2016)\nLongest time between haircuts: 138 days (November 28, 2022 to April 15, 2023)\nMedian time between haircuts: 69.0 days\nAverage time between haircuts: 68.8 days\nAverage time between last six haircuts: 50.8 days\nYour last haircut was 2 days ago. (December 17, 2024)\nYou probably should get another haircut in about 48 days. (February 05, 2025)\n```\n\n## Requirements\n\n+ [Python 3](https://www.python.org/downloads/)\n+ [Beautiful Soup 4](https://www.crummy.com/software/BeautifulSoup/)\n\n## Change Log\n\n### 20241218\n+ Ported script to Python 3\n+ Replaced `urllib2` library with `urllib.request` library\n+ Removed exception handling for malformed dates\n+ Median and average times are now formatted with a single decimal place\n+ Moved the script for Python 2 to the `/legacy/` directory\n\n### 20241111\n+ Added calculation of the average time between the previous six haircuts\n+ The next haircut date is now based on the previous six haircut average\n+ Changed terminology from “period” to “time” in the output\n\n### 20230121\n+ Added fix for [failed certificate verification](https://web.archive.org/web/20190428084018/http://blog.pengyifan.com/how-to-fix-python-ssl-certificate_verify_failed/) related to the `urllib2.py` library\n\n### 20220617\n+ Updated to [Beautiful Soup 4](https://www.crummy.com/software/BeautifulSoup/)\n+ Added `html.parser` argument to `BeautifulSoup()` constructor\n\n### 20211130\n+ Added “User-agent” header to fix `urllib2.HTTPError: HTTP Error 406: Not Acceptable`\n+ Standardized variable naming and value quoting because consistency\n\n### 20201010\n+ Added calculation of the median time between haircuts\n\n### 20200922\n+ Modified output for even more consistent display of days and dates\n+ Added newlines before and after output because readability\n\n### 20200714\n+ Modified output for haircuts occurring one day ago\n\n### 20200526\n+ Modified output for consistent display of days and dates\n+ Added more descriptive “next haircut” strings\n+ Added logic to display “day zero” status\n+ Updated URLs to use https\n\n### 20180327\n+ Added note regarding [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/) requirement\n\n### 20131109\n+ Set UTF-8 encoding\n\n### 20131023\n+ Educated the apostrophes\n+ Minor edits and formatting tweaks\n\n### 20121114\n+ Initial release as a [Gist](https://gist.github.com/kylefox/654113) by [Kyle Fox](https://github.com/kylefox/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplorp%2Fhaircut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplorp%2Fhaircut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplorp%2Fhaircut/lists"}