{"id":16848821,"url":"https://github.com/yoav-lavi/leita","last_synced_at":"2025-07-26T22:09:39.329Z","repository":{"id":115509147,"uuid":"445828324","full_name":"yoav-lavi/leita","owner":"yoav-lavi","description":"A universal search query language that can transpile into specific search provider syntax","archived":false,"fork":false,"pushed_at":"2022-01-14T17:23:24.000Z","size":69,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T07:44:20.043Z","etag":null,"topics":["lexer","query","rust","search","transpilation","universal"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/yoav-lavi.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}},"created_at":"2022-01-08T13:33:52.000Z","updated_at":"2024-11-14T22:01:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"08b4ea90-24fa-444c-a121-c1d0a021f560","html_url":"https://github.com/yoav-lavi/leita","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yoav-lavi/leita","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fleita","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fleita/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fleita/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fleita/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoav-lavi","download_url":"https://codeload.github.com/yoav-lavi/leita/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoav-lavi%2Fleita/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267249434,"owners_count":24059768,"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-26T02:00:08.937Z","response_time":62,"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":["lexer","query","rust","search","transpilation","universal"],"created_at":"2024-10-13T13:12:44.751Z","updated_at":"2025-07-26T22:09:39.323Z","avatar_url":"https://github.com/yoav-lavi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leita \u003cimg height=32px width=32px src=https://raw.githubusercontent.com/yoav-lavi/leita/main/leita.svg alt=\"leita\"\u003e\n\u003c/svg\u003e\n\nA universal search query language that can transpile into specific search provider syntax (currently only Google syntax is supported)\n\nA personal project to explore Rust and lexers\n\n## Name\n\nLeita means _\"to seek\"_ or _\"to search\"_ in Old Norse and many descendant languages\n\n## Install\n\n### Cargo\n\nClone this repository and run the following command in the repository root:\n\n```sh\ncargo install --path .\n```\n\n## Usage\n\n```sh\nleita \u003cquery\u003e\n```\n\n## Syntax\n\n| **Concept**   | **Leita**                            | **Google**                      |  **DuckDuckGo**  | **Stack Overflow**         | **GitHub**              |\n| ------------- | ------------------------------------ | ------------------------------- | ---------------- | -------------------------- | ----------------------- |\n| exact         | \"term\"                               | \"term\"                          | \"term\"           | \"term\"                     |                         |\n| and           | first \u0026 second                       | first AND second                |                  |                            |                         |   \n| or            | first \\| second                      | first OR second                 |                  | \\[first\\] OR \\[second\\]    |                         |    \n| not           | !term                                | \\-term                          |                  | \\-term                     | NOT term                |\n| one of        | (first \\| second \\| third)           | (first OR second OR third)      |                  |                            |                         |\n| wildcard      | first * second                       | first * second                  |                  |                            |                         |\n| numeric range | start-end                            | start..end                      |                  | start..end                 | start..end              |\n| distance      | first ~count second                  | first AROUND(count) second      |                  |                            |                         |\n| escaped       | \\token                               |                                 |                  |                            |                         |\n| more          |                                      |                                 | +term            |                            |                         |\n| less          |                                      |                                 | -term            |                            |                         |\n\nNotes:\n- Only Google syntax is supported at the moment, other syntaxes added as examples\n- Google supports `|` in place of `OR`\n- Stack Overflow supports wildcards, but only inside a word\n\n### Examples\n\n- `(dog | cat | wolf | yeti) shampoo 2021-2022 \"great!\" !lavender home-made` → `(dog OR cat OR wolf OR yeti) shampoo 2021..2022 \"great!\" -lavender home-made`\n  - Tokens in quotes need not be escaped\n  - Ranges are `number-number` only\n- `good ~5 dog` → `good AROUND(5) dog`\n\n## Not Supported\n\n- At the moment an exact term (`\"term\"`) cannot have escaped quotes (`\"\\\"term\\\"\"`)\n\n## Acknowledgements\n\nLeita uses the following:\n\n- [Logos](https://github.com/maciejhirsz/logos)\n- [Clap](https://github.com/clap-rs/clap)\n\nAssets:\n\n- The search icon is from [Heroicons](https://heroicons.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoav-lavi%2Fleita","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoav-lavi%2Fleita","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoav-lavi%2Fleita/lists"}