{"id":19024624,"url":"https://github.com/yukihirop/gfzs","last_synced_at":"2026-05-12T23:38:33.239Z","repository":{"id":47696716,"uuid":"326442428","full_name":"yukihirop/gfzs","owner":"yukihirop","description":"Google Fuzzy Search 🌍  is a tool for fuzzy find for the result of searching with googler.","archived":false,"fork":false,"pushed_at":"2021-08-17T16:15:02.000Z","size":298,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-04T06:02:51.617Z","etag":null,"topics":["command-line-tool","fuzzy-finder","fuzzy-search","google","googler","python3","terminal","tui"],"latest_commit_sha":null,"homepage":"","language":"Python","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/yukihirop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-01-03T15:48:07.000Z","updated_at":"2021-08-17T16:15:03.000Z","dependencies_parsed_at":"2022-09-26T19:52:36.002Z","dependency_job_id":null,"html_url":"https://github.com/yukihirop/gfzs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukihirop%2Fgfzs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukihirop%2Fgfzs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukihirop%2Fgfzs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukihirop%2Fgfzs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yukihirop","download_url":"https://codeload.github.com/yukihirop/gfzs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240072132,"owners_count":19743526,"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":["command-line-tool","fuzzy-finder","fuzzy-search","google","googler","python3","terminal","tui"],"created_at":"2024-11-08T20:37:43.961Z","updated_at":"2026-04-29T22:30:16.928Z","avatar_url":"https://github.com/yukihirop.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![gfzs](https://user-images.githubusercontent.com/11146767/105204059-25556c80-5b87-11eb-862e-828a80aa6a94.png)\n\n[![Downloads](https://pepy.tech/badge/gfzs)](https://pepy.tech/project/gfzs)\n[![Downloads](https://pepy.tech/badge/gfzs/month)](https://pepy.tech/project/gfzs)\n[![Downloads](https://pepy.tech/badge/gfzs/week)](https://pepy.tech/project/gfzs)\n\n`Google Fuzzy Search` is a tool for fuzzy find for the result of searching with [googler](https://github.com/jarun/googler).\n\n![gfzs](https://user-images.githubusercontent.com/11146767/105366627-e2f16580-5c42-11eb-92ef-8cd1aa87ce77.gif)\n\n![image](https://user-images.githubusercontent.com/11146767/105366973-47142980-5c43-11eb-89d1-9e24e6a48106.png)\n\n## ⚠ Warning\n\n![alert_tape](https://user-images.githubusercontent.com/11146767/105363618-93f60100-5c3f-11eb-8cb9-4f01ec49b486.png)\n\nIf you get the following response, stop using it.\nThis is an error from `google`. So [you can't do anything with googler](https://github.com/jarun/googler/issues/276#issuecomment-482754595). Please use it after a while.\n\n```\n$ googler --json --count 100 python | gfzs\nError: Expecting value: line 1 column 2 (char 1)\nInput data: [ERROR] Connection blocked due to unusual activity. THIS IS NOT A BUG, please do NOT report it as a bug unless you have specific information that may lead to the development of a workaround. You IP address is temporarily or permanently blocked by Google and requires reCAPTCHA-solving to use the service, which googler is not capable of. Possible causes include issuing too many queries in a short time frame, or operating from a shared / low reputation IP with a history of abuse. Please do NOT use googler for automated scraping.\n```\n\nTo avoid such problems, **it is better not to set `googler's count option`.**\n\n**We are not responsible if you ignore the advice and block your IP. please note that.**\n\n![alert_tape](https://user-images.githubusercontent.com/11146767/105363618-93f60100-5c3f-11eb-8cb9-4f01ec49b486.png)\n\n## 🐍 Install\n\n```bash\npip install gfzs\n```\n\nor\n\n```bash\npipx instal gfzs\n```\n\n## 😎 Demo\n\nseeing is believing.  \nYou can easily try what kind of app it is.\n\n```bash\ngfzs demo\n```\n\n## 🌍 Environment\n\n- python3 (over Python 3.6.1)\n- poetry\n\n## 📖 Usage\n\n```bash\n$ gfzs -h\n\nusage: gfzs [-h] [--version] [--score SCORE] [--log-level LOG_LEVEL]\n            [--log-path LOG_PATH]\n            {init,edit,demo,valid} ...\n\nGoogle Fuzzy Search. Pipe the search result(json) of googler and use it\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --version, -v         show program's version number and exit\n  --score SCORE, -s SCORE\n                        fuzzywuzzy's score (default: 30). please see\n                        https://github.com/seatgeek/fuzzywuzzy\n  --log-level LOG_LEVEL, -l LOG_LEVEL\n                        Log Level (default: 1). [0: DEBUG, 1: INFO, 2: WARN,\n                        3: ERROR, 4: FATAL, 5: UNKNOWN, 6: NULL]\n  --log-path LOG_PATH, -p LOG_PATH\n                        Log Path (default: ~/gfzs.log)\n\nSubCommands:\n  {init,edit,demo,valid}\n    init                Initialize gfzs\n    edit                Edit config\n    demo                Play with Demo\n    valid               Validate ~/.gfzsrc\n```\n\nInitialize first. A configuration file (`.gfzsrc`) is created in your home directory.\n\n```bash\n$ gfzs init\nInitialize config in /Users/yukihirop/.gfzsrc\n```\n\nNext, Prepare json with `title`, `url` and `abstract` as keys and pass it.\nFor Example, Assuming that data.json is as follows.\n\n`data.json`\n\n\u003cdetails\u003e\n\n```json\n[\n  {\n    \"abstract\": \"Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use ...\",\n    \"matches\": [\n      {\n        \"offset\": 0,\n        \"phrase\": \"Python\"\n      },\n      {\n        \"offset\": 79,\n        \"phrase\": \"Python's\"\n      }\n    ],\n    \"metadata\": \"Developer: Python Software Foundation | Designed by: Guido van Rossum | Filename extensions: .py,.pyi,.pyc,.pyd,.pyo ... | Typing discipline: Duck, dynamic, gradual (since ...\",\n    \"title\": \"Python (programming language) - Wikipedia\",\n    \"url\": \"https://en.wikipedia.org/wiki/Python_(programming_language)\"\n  },\n  {\n    \"abstract\": \"プログラミング言語 Pythonの紹介・ダウンロードとインストール・Python入門講座など.\",\n    \"matches\": [\n      {\n        \"offset\": 10,\n        \"phrase\": \"Python\"\n      },\n      {\n        \"offset\": 34,\n        \"phrase\": \"Python\"\n      }\n    ],\n    \"title\": \"プログラミング言語 Python - python.jp\",\n    \"url\": \"https://www.python.jp/\"\n  }\n]\n```\n\n\u003c/details\u003e\n\nPipe as standard input\n\n```bash\ncat data.json | gfzs\n```\n\n## 🚀 Practical Example (using googler)\n\n**It is recommended to use [alias](https://github.com/yukihirop/gfzs/wiki/%F0%9F%8D%96-Tips) to avoid accidentally passing the -n (--count) option to googler.**\n\n#### Search python articles on github.com\n\n```bash\ngoogler --json --site github.com python | gfzs\n```\n\n#### Display only those with a score of 50 or more in the search results\n\nPlease see here for [score](https://github.com/seatgeek/fuzzywuzzy).\n\n```bash\ngoogler --json --site github.com python | gfzs -s 50\n```\n\n## ⚙ Configure\n\nThe default setting is the following file, and each key can enter the following values.\n\nAfter changing the settings, you can check if the settings are correct with the `valid` command.\n\n```bash\n$ gfzs valid\nConfig is valid\n```\n\n`~/.gfzsrc`\n\n```json\n{\n  \"view\": {\n    \"footer\": {\n      \"message\": \"QUERY\u003e\",\n      \"color\": {\n        \"message\": {\n          \"text\": 2,\n          \"background\": 0,\n          \"style\": \"normal\"\n        },\n        \"hline\": {\n          \"text\": 7,\n          \"background\": 0,\n          \"style\": \"normal\"\n        }\n      }\n    },\n    \"header\": {\n      \"color\": {\n        \"hline\": {\n          \"text\": 7,\n          \"background\": 0,\n          \"style\": \"normal\"\n        }\n      }\n    },\n    \"search_result\": {\n      \"color\": {\n        \"index\": {\n          \"text\": 6,\n          \"background\": 0,\n          \"style\": \"normal\"\n        },\n        \"title\": {\n          \"text\": 2,\n          \"background\": 0,\n          \"style\": \"bold\"\n        },\n        \"url\": {\n          \"text\": 3,\n          \"background\": 0,\n          \"style\": \"link\"\n        },\n        \"abstract\": {\n          \"text\": 7,\n          \"background\": 0,\n          \"style\": \"normal\"\n        },\n        \"markup_partial\": {\n          \"text\": 2,\n          \"background\": 5,\n          \"style\": \"normal\"\n        },\n        \"markup_char\": {\n          \"text\": 1,\n          \"background\": 0,\n          \"style\": \"normal\"\n        }\n      }\n    },\n    \"paging\": {\n      \"color\": {\n        \"common\": {\n          \"text\": 2,\n          \"background\": 0,\n          \"style\": \"bold\"\n        }\n      }\n    }\n  }\n}\n```\n\n| key                   | description  | value                      |\n| --------------------- | ------------ | -------------------------- |\n| \u003ckbd\u003etext\u003c/kbd\u003e       | curses color | `0〜7`                     |\n| \u003ckbd\u003ebackground\u003c/kbd\u003e | curses color | `0〜7`                     |\n| \u003ckbd\u003estyle\u003c/kbd\u003e      | text style   | `\"normal\", \"link\", \"bold\"` |\n\n### curses color\n\n| number | description            |\n| ------ | ---------------------- |\n| `0`    | `curses.COLOR_BLACK`   |\n| `1`    | `curses.COLOR_RED`     |\n| `2`    | `curses.COLOR_GREEN`   |\n| `3`    | `curses.COLOR_YELLOW`  |\n| `4`    | `curses.COLOR_BLUE`    |\n| `5`    | `curses.COLOR_MAGENTA` |\n| `6`    | `curses.COLOR_CYAN`    |\n| `7`    | `curses.COLOR_WHITE`   |\n\n## ⚙ Environment Variable\n\n| name     | description                                 |\n| -------- | ------------------------------------------- |\n| `DEBUG`  | You will be able to use the `debug` module. |\n| `EDITOR` | Set the command to open the editor.         |\n\n## 💌 Logging\n\nBy default, logs with a `log level of INFO` or higher will be sent to `~/gfzs.log`.\n\n| Log Level | value | desc    |\n| --------- | ----- | ------- | --- |\n| `DEBUG`   | 0     |         |     |\n| `INFO`    | 1     | default |\n| `WARN`    | 2     |         |\n| `ERROR`   | 3     |         |\n| `FATAL`   | 4     |         |\n| `UNKNOWN` | 5     |         |\n| `NULL`    | 6     |         |\n\n## 🐛 Debug\n\nWhen you want to know the details of the movement or identify the cause of the error, you can change the log level to `DEBUG(0)` and debug with the log.\n\n```bash\n$ cat fixtures/python.json | bin/gfzs --log-level 0\n```\n\n## 💪 Development\n\nFirst, create a virtual environment.\n\n```bash\n$ python3 -m venv .venv\n$ poetry shell\n$ poetry install\n```\n\n```bash\n$ python3 gfzs/controller.py\n```\n\nor\n\n```bash\n$ cat fixtures/python.json | python3 -m gfzs\n```\n\nor\n\n```bash\n$ cat fixtures/python.json | bin/gfzs\n```\n\n## 💪 Development (Check Each View)\n\n### header\n\n```bash\n$ python3 gfzs/views/header.py\n```\n\n![image](https://user-images.githubusercontent.com/11146767/104927550-ed162880-59e4-11eb-8d5c-efca84c58ea6.png)\n\n### search_result\n\n```bash\n$ python3 gfzs/views/search_result.py\n```\n\n![image](https://user-images.githubusercontent.com/11146767/104927269-8e50af00-59e4-11eb-8fcf-8b18f4db4420.png)\n\n### paging\n\n```bash\n$ python3 gfzs/views/paging.py\n```\n\n![image](https://user-images.githubusercontent.com/11146767/104927802-36667800-59e5-11eb-9afb-2b3386c4d8c6.png)\n\n### footer\n\n```bash\n$ python3 gfzs/views/footer.py\n```\n\n![image](https://user-images.githubusercontent.com/11146767/104927398-b93b0300-59e4-11eb-99a8-5b1e85dc000d.png)\n\n### not_found\n\n```bash\n$ python3 gfzs/views/not_found.py\n```\n\n![image](https://user-images.githubusercontent.com/11146767/104927669-0d45e780-59e5-11eb-9dc8-76baec0c04ac.png)\n\n## 📚 Reference\n\nI really referred to the implementation of the following repository.\n\n- [mooz/percol](https://github.com/mooz/percol)\n- [mingrammer/awesome-finder](https://github.com/mingrammer/awesome-finder)\n- [frankdice/fuzzyui](https://github.com/frankdice/fuzzyui)\n- [NikolaiT/Scripts](https://github.com/NikolaiT/Scripts/blob/master/scripts/python/curses/text_selector.py)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukihirop%2Fgfzs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukihirop%2Fgfzs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukihirop%2Fgfzs/lists"}