{"id":28865505,"url":"https://github.com/busyloop/user_agent_parser","last_synced_at":"2025-07-29T08:02:47.801Z","repository":{"id":66253913,"uuid":"157756507","full_name":"busyloop/user_agent_parser","owner":"busyloop","description":"Parse user agent strings using the BrowserScope pattern library.","archived":false,"fork":false,"pushed_at":"2022-02-07T22:16:25.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T10:13:24.180Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Crystal","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/busyloop.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-15T18:41:41.000Z","updated_at":"2022-02-07T22:01:31.000Z","dependencies_parsed_at":"2023-02-20T18:45:15.823Z","dependency_job_id":null,"html_url":"https://github.com/busyloop/user_agent_parser","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/busyloop/user_agent_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fuser_agent_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fuser_agent_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fuser_agent_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fuser_agent_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/busyloop","download_url":"https://codeload.github.com/busyloop/user_agent_parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fuser_agent_parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267652271,"owners_count":24122092,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-06-20T10:13:22.838Z","updated_at":"2025-07-29T08:02:47.791Z","avatar_url":"https://github.com/busyloop.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# user_agent_parser\n\n[![GitHub release](https://img.shields.io/github/release/busyloop/user_agent_parser.svg)](https://github.com/busyloop/user_agent_parser/releases)\n[![Docs](https://img.shields.io/badge/docs-available-brightgreen.svg)](\u003chttps://busyloop.github.io/user_agent_parser/\u003e)\n\nA crystal shard for parsing user agent strings using the BrowserScope pattern library.\n\n## Installation\n\nAdd this to your application's `shard.yml`:\n\n```yaml\ndependencies:\n  user_agent_parser:\n    github: busyloop/user_agent_parser\n```\n\n## Usage\n\n```crystal\nrequire \"user_agent_parser\"\n\n## Load BrowserScope patterns, latest version\n## can be found here: https://raw.githubusercontent.com/ua-parser/uap-core/master/regexes.yaml\n\nUserAgent.load_regexes(File.read(\"regexes.yaml\"))\n\n# 1. Parse a user agent string\nua = UserAgent.new(\"Mozilla/5.0 (Linux; Android 7.0; SM-G892A Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Mobile Safari/537.36\")\n\n# 2. Inspect the result\nputs ua.family # =\u003e Chrome Mobile WebView\nputs ua.version # =\u003e 60.0.3112\n\nputs ua.device # =\u003e UserAgent::Device(@model=\"SM-G892A\", @brand=\"Samsung\", @name=\"Samsung SM-G892A\")\n\nputs ua.os # =\u003e UserAgent::Os(@family=\"Android\", @version=#\u003cSemanticVersion:0x10c1c97e0 @major=7, @minor=0, @patch=0, @build=nil, @prerelease=SemanticVersion::Prerelease(@identifiers=[])\u003e)\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/busyloop/user_agent_parser/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusyloop%2Fuser_agent_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbusyloop%2Fuser_agent_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusyloop%2Fuser_agent_parser/lists"}