{"id":18525661,"url":"https://github.com/a-know/kabu","last_synced_at":"2025-10-09T01:39:39.944Z","repository":{"id":57571824,"uuid":"110400066","full_name":"a-know/kabu","owner":"a-know","description":"前株／後株判定ツール","archived":false,"fork":false,"pushed_at":"2020-12-16T14:25:25.000Z","size":5,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-13T09:30:47.165Z","etag":null,"topics":["customsearch-api","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/a-know.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":"2017-11-12T03:02:18.000Z","updated_at":"2021-05-13T06:23:46.000Z","dependencies_parsed_at":"2022-08-23T20:11:25.867Z","dependency_job_id":null,"html_url":"https://github.com/a-know/kabu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/a-know/kabu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-know%2Fkabu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-know%2Fkabu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-know%2Fkabu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-know%2Fkabu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-know","download_url":"https://codeload.github.com/a-know/kabu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-know%2Fkabu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000716,"owners_count":26082895,"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-10-08T02:00:06.501Z","response_time":56,"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":["customsearch-api","golang"],"created_at":"2024-11-06T17:46:38.986Z","updated_at":"2025-10-09T01:39:39.899Z","avatar_url":"https://github.com/a-know.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kabu\n## About\n`kabu` は、【前株／後株判定ツール】です。\n\n- 前株\n    - 株式会社ほげほげ\n- 後株\n    - ほげほげ株式会社\n\n判定できた際には、会社名が自動的にクリップボードにコピーされます。\n\n## Usage\n\n`kabu` は、[Google Custom Search API](https://developers.google.com/custom-search/json-api/v1/overview) を使用するため、予め [Goole Cloud Console](https://cloud.google.com/console/project) から API キーを取得し、環境変数にセットしておく必要があります。\n\n```console\n$ export GOOGLE_APIKEY=ABCDE12345\n```\n\n`kabu` は [Custom search engine](https://www.google.com/cse/) も使用するため、予め Custom Search Engine を作成し ID を取得、環境変数にセットしておく必要があります。\n\n```console\n$ export GOOGLE_CSE_ID=ABCDE12345\n```\n\nインストールは以下の方法で可能です。\n\n```console\n$ go get github.com/a-know/kabu\n```\n\n## Design\n\n「会社名 株式会社」で Google 検索をおこなった結果に対し、「株式会社（会社名）」「（会社名）株式会社」それぞれのパターンでマッチした数を数え、カウントの多かった方を正として判定結果を表示します。判定結果は自動的にクリップボードにコピーされます。\n\n判定したい会社名をクリップボードにコピーした状態で、 `kabu` への引数を省略した場合には、クリップボードにある文字列を用いて判定処理をおこないます。\n\n## Example\n### 引数を指定する場合\n```console\n$ kabu はてな\n前株マッチ数:9\n後株マッチ数:0\n前株です！\n株式会社はてな\n```\n\n### クリップボードにコピーされている文字列を利用したい場合\n\n```console\n$ ./kabu\n引数が省略されたため、クリップボードの内容を用いて判定します。\n前株マッチ数:9\n後株マッチ数:0\n前株です！\n株式会社はてな\n```\n\n### 判定結果はクリップボードにコピーされます\n\n```sh\n# cmd + V (paste)\n株式会社はてな\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-know%2Fkabu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-know%2Fkabu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-know%2Fkabu/lists"}