{"id":15293341,"url":"https://github.com/rzhade3/filetype","last_synced_at":"2025-04-13T13:20:47.065Z","repository":{"id":46441652,"uuid":"1664182","full_name":"rzhade3/filetype","owner":"rzhade3","description":"Find a file type according to a filename or extension","archived":false,"fork":false,"pushed_at":"2023-01-18T20:15:14.000Z","size":43,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T11:52:19.180Z","etag":null,"topics":["filetype","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/filetype","language":"Ruby","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/rzhade3.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":"2011-04-26T10:26:23.000Z","updated_at":"2022-11-28T16:09:09.000Z","dependencies_parsed_at":"2023-02-10T17:45:17.865Z","dependency_job_id":null,"html_url":"https://github.com/rzhade3/filetype","commit_stats":null,"previous_names":["injekt/filetype"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzhade3%2Ffiletype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzhade3%2Ffiletype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzhade3%2Ffiletype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzhade3%2Ffiletype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rzhade3","download_url":"https://codeload.github.com/rzhade3/filetype/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248718048,"owners_count":21150497,"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":["filetype","ruby"],"created_at":"2024-09-30T16:46:22.697Z","updated_at":"2025-04-13T13:20:47.044Z","avatar_url":"https://github.com/rzhade3.png","language":"Ruby","readme":"# Filetype\n\nFind a file type according to a filename or extension\n\n## Installation\n\n### Rubygems\n\n```bash\ngem install filetype\n```\n\n### GitHub\n\n```bash\ngit clone https://github.com/rzhade3/filetype\ngem build filetype.gemspec\ngem install filetype-\u003cversion\u003e.gem\n```\n\n## Usage\n\n```ruby\nFiletype.get('foo.rb') #=\u003e :ruby\nFiletype.all('foo.h')  #=\u003e [:c, :cpp, :objc]\n```\n\n## Custom file types\n\nYou can add your own custom file types\n\n```ruby\nFiletype.add(:cool, %w[ cool kl ])\nFiletype.get('hello.kl') #=\u003e :cool\n```\n\n## Simple\n\nYou may notice how basic Filetype is, all it's doing is checking the file name\nor file extension. Well, that's its intention, it was built for nothing more.\nIf you want more advanced information, check out the\n[mime-types](https://rubygems.org/gems/mime-types) library.\n\n## Contributing\n\nThe list of file types Filetype supports can be found\n[here](lib/filetype.rb#L6).\nPlease feel free to add file types!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frzhade3%2Ffiletype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frzhade3%2Ffiletype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frzhade3%2Ffiletype/lists"}