{"id":17272855,"url":"https://github.com/kalkin/file-expert","last_synced_at":"2025-08-13T20:11:04.289Z","repository":{"id":47155281,"uuid":"117264085","full_name":"kalkin/file-expert","owner":"kalkin","description":"File type recognition system similar to GitHub/linguist written in Rust","archived":false,"fork":false,"pushed_at":"2022-10-09T12:15:00.000Z","size":973,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T21:52:07.309Z","etag":null,"topics":["expert","expert-system","linguist","linguist-heuristics","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kalkin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-12T16:33:11.000Z","updated_at":"2022-11-02T11:44:10.000Z","dependencies_parsed_at":"2022-09-26T20:10:53.522Z","dependency_job_id":null,"html_url":"https://github.com/kalkin/file-expert","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalkin%2Ffile-expert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalkin%2Ffile-expert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalkin%2Ffile-expert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalkin%2Ffile-expert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kalkin","download_url":"https://codeload.github.com/kalkin/file-expert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844036,"owners_count":21170505,"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":["expert","expert-system","linguist","linguist-heuristics","rust"],"created_at":"2024-10-15T08:49:38.843Z","updated_at":"2025-04-14T08:21:00.284Z","avatar_url":"https://github.com/kalkin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file-expert\n\nAn expert system for recognizing source file, similar to\n[GitHub/linguist](https://github.com/github/linguist), but written in Rust.\n\n## Usage\n\n```shell\nfile-expert FILE…\n```\n\nThe program can also read the files from `STDIN` like this:\n\n```shell\ngit ls-files|file-expert\n```\n\n### Output Format\n\nEach output line contains the filename and the file type separated by the tab\ncharacter.\n\n#### Output Example\n\n```\n.gitignore      Ignore List\n.gitlint.yaml   YAML\n.gitmodules     Git Config\nCOPYING.md      Markdown\nMakefile.am     Makefile\nREADME.md       Markdown\nconfigure.ac    M4Sugar\nextra-extensions-kb.pl  Prolog\nfile-expert.pl  Prolog\nheuristics.yml  YAML\nlanguages.yml   YAML\nm4/BKG_DIRECTORY_VARIABLES.m4   M4Sugar\nm4/BKG_ENABLE_XDG.m4    M4Sugar\nm4/BKG_PACKAGE_INFO.m4  M4Sugar\nrun-tests       Shell\ntransform.py    Python\n```\n\n## Installation\n\n### Build Dependencies\n\n* cargo\n\n### Via Cargo\n\n`cargo install file-expert`\n\n#### From Source\n\n⒈ Checkout this repository `git clone https://github.com/kalkin/file-expert`.\n\n⒉ Run `cargo install --path .` to build and install it.\n\n## Current State\n\nIn production.\n\n## Versioning\n\nThis project uses [SemVer](http://semver.org/) for versioning. For the versions\navailable, see the [tags on this repository](https://github.com/kalkin/file-expert/tags).\n\n## History\n\nStarted around November 2017. Replaced with a Nim implementation in December\n2018, because at this point the GitHub/linguist heuristics were a huge mess of\n`if … else` Ruby spaghetti code.\n\nThis project was archived until January 2019. My Nim implementation was broken\nby the compiler update. While fixing it I noticed that the GitHub/linguist\nheuristics were refactored to a YAML file. This opened up the possibility to\neasily autogenerate the heuristics rules. So I started working on the Prolog\nimplementation again.\n\nDuring the COVID-19 Summer in June 2021 I got proficient enough to rewrite this\nproject in Rust. The main benefit is the sheer performance gain.\n\n## License\n\nThis project is licensed under the GNU Affero General Public License - see the\n[COPYING.md](COPYING.md) file for details.\n\n## AUTHOR\n\nWritten by Bahtiar \\`kalkin-\\` Gadimov.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalkin%2Ffile-expert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalkin%2Ffile-expert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalkin%2Ffile-expert/lists"}